在android应用程序的firebase数据库上注册登录和上载项目

在android应用程序的firebase数据库上注册登录和上载项目,firebase,firebase-realtime-database,Firebase,Firebase Realtime Database,我正在创建android应用程序,用于上传图像和一些其他文本字段,用于描述图像以及纬度和经度。 我从上传活动开始,它工作得很好,但在引入登录和注册活动后,上传从未成功,相反,我遇到了存储异常 我只能添加用户和登录,但无法上载项目。下面是我的上传活动- 主要活动: public class MainActivity extends AppCompatActivity { private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE

我正在创建android应用程序,用于上传图像和一些其他文本字段,用于描述图像以及纬度和经度。 我从上传活动开始,它工作得很好,但在引入登录和注册活动后,上传从未成功,相反,我遇到了存储异常

我只能添加用户和登录,但无法上载项目。下面是我的上传活动-

主要活动:

public class MainActivity extends AppCompatActivity {

    private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE = 100;
    private static final String TAG = "PhotoScreen";
    private ImageView imageView;
    private Button btn;
    private TextView longit,lat, imageName, mynotes;
    private String imageLocation="";
    final int Permission_All = 1;
    ProgressDialog mprogress;

    Uri picUri;
    double latitude;
    double longitude;
    String timeStamp;
    StorageReference storageReference;
    DatabaseReference mRef1;


    GPSTracker gps;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        lat = (TextView) findViewById(R.id.lati);
        longit = (TextView) findViewById(R.id.longit);
        imageView = (ImageView) findViewById(R.id.capturedImage);
        imageName=(EditText)findViewById(R.id.image_name);
        mynotes=(EditText)findViewById(R.id.notes);
        mprogress=new ProgressDialog(this);

        //Storage initialized
       storageReference = FirebaseStorage.getInstance().getReference();

       mRef1 =FirebaseDatabase.getInstance().getReference("Homes");


        //pictureSaveFolderPath = getExternalCacheDir();

        String[] permissions = {Manifest.permission.CAMERA, Manifest.permission.ACCESS_COARSE_LOCATION,
                Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.WRITE_EXTERNAL_STORAGE};

        if (!hasPermissions(this, permissions)) {

            ActivityCompat.requestPermissions(this, permissions, Permission_All);

         }

        btn = (Button) findViewById(R.id.sendBtn);

        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent camIntent =new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//           // startActivityForResult(camIntent,CAMERA_CAPTURE_IMAGE_REQUEST_CODE);

                File picDirectory=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
                String picName=getPictureName();
                File imageFile=new File(picDirectory,picName);
                picUri=Uri.fromFile(imageFile);

                camIntent.putExtra(MediaStore.EXTRA_OUTPUT,picUri);
                startActivityForResult(camIntent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);


            }
        });


    }



    public static boolean hasPermissions(Context context, String... permissions) {

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && context != null && permissions != null) {
            for (String permission : permissions) {

                if (ActivityCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {
                    return false;
                }

            }
        }
        return true;
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {

        if (resultCode == RESULT_OK) {
            if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {

                imageView.setImageURI(picUri);



            }

         }

        gps = new GPSTracker(MainActivity.this);
        if(gps.canGetLocation())
        {
            latitude = (float) gps.getLatitude();
            longitude= (float) gps.getLongitude();

            String  finalLatitude=Double.toString(latitude);
            String finalLongitude=Double.toString(longitude);

            longit.setText(finalLongitude);
            lat.setText(finalLatitude);
            // Toast.makeText(getApplicationContext(), "Your Location is - \nLat: " + latitude + "\nLong: " + longitude, Toast.LENGTH_LONG).show();
        }


        }

    public void onClickAddUploadData(View view) {

        final String imageName_Str=imageName.getText().toString().trim();
        final String mynotes_Str=mynotes.getText().toString().trim();

        if (!TextUtils.isEmpty(imageName_Str) &&!TextUtils.isEmpty(mynotes_Str) ){
            mprogress.setMessage("Uploading...");
            mprogress.show();
            StorageReference filepath = storageReference.child("images").child(picUri.getLastPathSegment());
            filepath.putFile(picUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
//                @Override
                public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {

                    final Uri downloadUri =taskSnapshot.getDownloadUrl();
                    final  DatabaseReference newPost=mRef1.push();

                    newPost.child("Image_Name").setValue(imageName_Str);
                    newPost.child("Latitude").setValue(latitude);
                    newPost.child("Longitude").setValue(longitude);
                    newPost.child("Short_Notes").setValue(mynotes_Str);

                    if (downloadUri != null) {
                        newPost.child("Apartment_Image").setValue(downloadUri.toString());
                        Log.i(TAG,"image uri url"+downloadUri);
                     }

                    mprogress.dismiss();
                    Toast.makeText(MainActivity.this, "Upload Successful", Toast.LENGTH_SHORT).show();
                }
            }).addOnFailureListener(new OnFailureListener() {
//                @Override
                public void onFailure(@NonNull Exception e) {
                    Toast.makeText(MainActivity.this, "Upload Failed", Toast.LENGTH_SHORT).show();
                    mprogress.dismiss();
                }
            });
        }
        else {
            Toast.makeText(MainActivity.this, "You need to include some description", Toast.LENGTH_SHORT).show();
        }



    }


    private String getPictureName() {

        timeStamp= new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());

        return "connected_home"+timeStamp+".jpg";

        }


}
public类MainActivity扩展了AppCompatActivity{
专用静态最终int摄像机\捕获\图像\请求\代码=100;
私有静态最终字符串标记=“PhotoScreen”;
私人影像视图;
专用按钮btn;
私有文本视图longit、lat、imageName、mynotes;
私有字符串imageLocation=“”;
最终int权限_All=1;
进步;
乌里·皮库里;
双纬度;
双经度;
字符串时间戳;
StorageReference-StorageReference;
数据库参考mRef1;
全球定位系统;
@凌驾
创建时受保护的void(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lat=(TextView)findViewById(R.id.lati);
longit=(TextView)findViewById(R.id.longit);
imageView=(imageView)findViewById(R.id.CaptureDiImage);
imageName=(EditText)findViewById(R.id.image\u name);
mynotes=(EditText)findViewById(R.id.notes);
mpprogress=新建进度对话框(此对话框);
//存储器已初始化
storageReference=FirebaseStorage.getInstance().getReference();
mRef1=FirebaseDatabase.getInstance().getReference(“Homes”);
//pictureSaveFolderPath=getExternalCacheDir();
字符串[]权限={Manifest.permission.CAMERA,Manifest.permission.ACCESS\u\u位置,
Manifest.permission.ACCESS\u FINE\u LOCATION,Manifest.permission.WRITE\u EXTERNAL\u STORAGE};
如果(!hasPermissions(此,permissions)){
ActivityCompat.requestPermissions(此、权限、权限\全部);
}
btn=(按钮)findViewById(R.id.sendBtn);
imageView.setOnClickListener(新视图.OnClickListener(){
@凌驾
公共void onClick(视图){
意向camIntent=新意向(MediaStore.ACTION\u IMAGE\u CAPTURE);
////startActivityForResult(camIntent、CAMERA\u CAPTURE\u IMAGE\u REQUEST\u CODE);
文件picDirectory=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY\u图片);
字符串picName=getPictureName();
File imageFile=新文件(picDirectory,picName);
picUri=Uri.fromFile(imageFile);
camentent.putExtra(MediaStore.EXTRA_输出,picUri);
startActivityForResult(摄像机意图、摄像机捕捉、图像、请求、代码);
}
});
}
公共静态权限(上下文、字符串…权限){
if(Build.VERSION.SDK_INT>=Build.VERSION_code.M&&context!=null&&permissions!=null){
用于(字符串权限:权限){
if(ActivityCompat.checkSelfPermission(context,permission)!=PackageManager.permission\u已授予){
返回false;
}
}
}
返回true;
}
@凌驾
受保护的void onActivityResult(int请求代码、int结果代码、意图数据){
if(resultCode==RESULT\u OK){
if(requestCode==摄像机捕捉图像请求代码){
setImageURI(picUri);
}
}
gps=新的GP斯特拉克(MainActivity.this);
if(gps.canGetLocation())
{
纬度=(浮点)gps.getLatitude();
经度=(float)gps.getLongitude();
字符串最终性=双精度字符串(纬度);
字符串finalLongitude=Double.toString(经度);
纵向(最终方向);
lat.setText(最终性);
//Toast.makeText(getApplicationContext(),“您的位置是-\nLat:“+纬度+”\nLong:“+经度,Toast.LENGTH\u LONG).show();
}
}
public void onClickAddUploadData(视图){
最终字符串imageName_Str=imageName.getText().toString().trim();
最后一个字符串mynotes_Str=mynotes.getText().toString().trim();
如果(!TextUtils.isEmpty(imageName_Str)和&!TextUtils.isEmpty(mynotes_Str)){
设置消息(“上传…”);
mprogress.show();
StorageReference文件路径=StorageReference.child(“图像”).child(picUri.getLastPathSegment());
filepath.putFile(picUri).addOnSuccessListener(新的OnSuccessListener(){
//@覆盖
成功时公共无效(UploadTask.TaskSnapshot TaskSnapshot){
最终Uri downloadUri=taskSnapshot.getDownloadUrl();
最终数据库引用newPost=mRef1.push();
newPost.child(“Image_Name”).setValue(imageName_Str);
newPost.child(“纬度”).setValue(纬度);
newPost.child(“经度”).setValue(经度);
newPost.child(“Short_Notes”).setValue(mynotes_Str);
if(downloadUri!=null){
newPost.child(“公寓图像”).setValue(downloadUri.toString());
Log.i(标记,“图像uri url”+下载uri);
}
mprogress.disclose();
Toast.makeText(MainActivity.this,“上载成功”,Toast.LENGTH_SHORT.show();
}
}).addOnFailureListener(新的OnFailureListener(){
//@覆盖
public void onFailure(@NonNull异常e){
Toast.makeText(MainActivity.this,“上载失败”,Toast.LENGTH_SHORT.show();
mprogress.disclose();
}
08-21 18:29:52.200 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: register, handle(0x7f8fdc5340) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:52.201 24828-24878/com.example.jackoyee.geopics D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 92, 0, 89, 472
08-21 18:29:52.421 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [+]r_hnd(0x7f98434940), client(48), share_fd(69)
08-21 18:29:52.421 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: register, handle(0x7f98434940) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:52.569 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [+]r_hnd(0x7f984349e0), client(48), share_fd(71)
08-21 18:29:52.569 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: register, handle(0x7f984349e0) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:52.585 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [+]r_hnd(0x7f8fdc46c0), client(48), share_fd(70)
08-21 18:29:52.585 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: register, handle(0x7f8fdc46c0) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:53.170 24828-25006/com.example.jackoyee.geopics D/libc-netbsd: getaddrinfo: firebasestorage.googleapis.com get result from proxy gai_error = 0
08-21 18:29:53.171 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]rx timeout:0
08-21 18:29:53.171 24828-25006/com.example.jackoyee.geopics I/System.out: [socket][0] connection firebasestorage.googleapis.com/216.58.201.74:443;LocalPort=52857(0)
08-21 18:29:53.171 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]connect[firebasestorage.googleapis.com/216.58.201.74:443]
08-21 18:29:53.171 24828-25006/com.example.jackoyee.geopics D/Posix: [Posix_connect Debug]Process com.example.jackoyee.geopics :443 
08-21 18:29:53.362 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]port[52857]
08-21 18:29:53.362 24828-25006/com.example.jackoyee.geopics I/System.out: [socket][/105.230.147.188:52857] connected
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/libc-netbsd: [getaddrinfo]: hostname=firebasestorage.googleapis.com; servname=(null); netid=0; mark=0
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 NativeCrypto_SSL_do_handshake fd=0x7f817d1148 shc=0x7f817d114c timeout_millis=0 client_mode=1 npn=0x0
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake ++
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x10 ret=1
08-21 18:29:53.364 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 handshake start in CINIT  before connect initialization
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback calling handshakeCompleted
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback completed
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:CINIT  before connect initialization
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3WCH_A SSLv3 write client hello A
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1002 ret=-1
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:error exit in 3RSH_A SSLv3 read server hello A
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake -- ret=-1
08-21 18:29:53.365 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=0
08-21 18:29:53.565 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake ++
08-21 18:29:53.565 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.565 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RSH_A SSLv3 read server hello A
08-21 18:29:53.565 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.565 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1002 ret=-1
08-21 18:29:53.566 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:error exit in 3RSC_A SSLv3 read server certificate A
08-21 18:29:53.566 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.566 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake -- ret=-1
08-21 18:29:53.566 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=0
08-21 18:29:53.567 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake ++
08-21 18:29:53.568 24828-25006/com.example.jackoyee.geopics E/NativeCrypto: ssl=0x7f8644df80 cert_verify_callback x509_store_ctx=0x7f817d0e10 arg=0x0
08-21 18:29:53.568 24828-25006/com.example.jackoyee.geopics E/NativeCrypto: ssl=0x7f8644df80 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_ECDSA
08-21 18:29:53.613 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 cert_verify_callback => 1
08-21 18:29:53.613 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.613 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RSC_A SSLv3 read server certificate A
08-21 18:29:53.613 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RSKEA SSLv3 read server key exchange A
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RSD_A SSLv3 read server done A
08-21 18:29:53.618 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3WCKEA SSLv3 write client key exchange A
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3WCCSA SSLv3 write change cipher spec A
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3WFINA SSLv3 write finished A
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3FLUSH SSLv3 flush data
08-21 18:29:53.624 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.625 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1002 ret=-1
08-21 18:29:53.625 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:error exit in UNKWN  SSLv3 read server session ticket A
08-21 18:29:53.625 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.625 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake -- ret=-1
08-21 18:29:53.625 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=0
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake ++
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:UNKWN  SSLv3 read server session ticket A
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RCCS_ SSLv3 read change cipher spec
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1001 ret=1
08-21 18:29:53.823 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:3RFINA SSLv3 read finished A
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x20 ret=1
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 handshake done in SSLOK  SSL negotiation finished successfully
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback calling handshakeCompleted
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback completed
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback where=0x1002 ret=1
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 SSL_connect:ok exit in SSLOK  SSL negotiation finished successfully
08-21 18:29:53.824 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 info_callback ignored
08-21 18:29:53.825 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: doing handshake -- ret=1
08-21 18:29:53.825 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 NativeCrypto_SSL_get_certificate => NULL
08-21 18:29:53.825 24828-25006/com.example.jackoyee.geopics I/System.out: gba_cipher_suite:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
08-21 18:29:53.825 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]rx timeout:0
08-21 18:29:53.826 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]rx timeout:0
08-21 18:29:53.826 24828-25006/com.example.jackoyee.geopics I/System.out: [CDS]SO_SND_TIMEOUT:0
08-21 18:29:53.826 24828-25006/com.example.jackoyee.geopics I/System.out: [OkHttp] sendRequest<<
08-21 18:29:53.826 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 sslWrite buf=0x7f85ae9800 len=1509 write_timeout_millis=0
08-21 18:29:53.826 24828-25006/com.example.jackoyee.geopics D/NativeCrypto: ssl=0x7f8644df80 sslRead buf=0x7f85ae9800 len=2048,timeo=0
08-21 18:29:54.554 24828-25006/com.example.jackoyee.geopics E/StorageException: StorageException has occurred.
                                                                                User does not have permission to access this object.
                                                                                 Code: -13021 HttpResult: 403
08-21 18:29:54.554 24828-25006/com.example.jackoyee.geopics E/StorageException: The server has terminated the upload session
                                                                                java.io.IOException: The server has terminated the upload session
                                                                                    at com.google.firebase.storage.UploadTask.zzLb(Unknown Source)
                                                                                    at com.google.firebase.storage.UploadTask.zzLa(Unknown Source)
                                                                                    at com.google.firebase.storage.UploadTask.run(Unknown Source)
                                                                                    at com.google.firebase.storage.zzr.run(Unknown Source)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
08-21 18:29:54.555 24828-25006/com.example.jackoyee.geopics E/StorageException: StorageException has occurred.
                                                                                User does not have permission to access this object.
                                                                                 Code: -13021 HttpResult: 403
08-21 18:29:54.555 24828-25006/com.example.jackoyee.geopics E/StorageException: The server has terminated the upload session
                                                                                java.io.IOException: The server has terminated the upload session
                                                                                    at com.google.firebase.storage.UploadTask.zzLb(Unknown Source)
                                                                                    at com.google.firebase.storage.UploadTask.zzLa(Unknown Source)
                                                                                    at com.google.firebase.storage.UploadTask.run(Unknown Source)
                                                                                    at com.google.firebase.storage.zzr.run(Unknown Source)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
08-21 18:29:54.570 24828-24878/com.example.jackoyee.geopics D/Surface: Surface::disconnect(this=0x7f85b9c800,api=1)
08-21 18:29:54.571 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: unregister, handle(0x7f8fdc5340) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:54.572 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [-]r_hnd(0x7f8fdc5340), client(48), share_fd(68)
08-21 18:29:54.572 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: unregister, handle(0x7f98434940) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:54.572 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [-]r_hnd(0x7f98434940), client(48), share_fd(69)
08-21 18:29:54.573 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: unregister, handle(0x7f984349e0) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:54.573 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [-]r_hnd(0x7f984349e0), client(48), share_fd(71)
08-21 18:29:54.574 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: unregister, handle(0x7f8fdc46c0) (w:812 h:360 s:816 f:0x1 u:0x000b00)
08-21 18:29:54.574 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [-]r_hnd(0x7f8fdc46c0), client(48), share_fd(70)
08-21 18:29:54.574 24828-24878/com.example.jackoyee.geopics D/Surface: Surface::disconnect(this=0x7f85b9c800,api=1)
08-21 18:29:54.579 24828-24828/com.example.jackoyee.geopics D/WindowClient: Remove from mViews: com.android.internal.policy.PhoneWindow$DecorView{5d19c46 V.E...... R......D 0,0-684,232}, this = android.view.WindowManagerGlobal@36398d6
08-21 18:29:54.581 24828-24828/com.example.jackoyee.geopics D/WindowClient: Add to mViews: android.widget.LinearLayout{898c716 V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@36398d6
08-21 18:29:54.582 24828-24878/com.example.jackoyee.geopics D/OpenGLRenderer: CanvasContext() 0x7f82ef2800
08-21 18:29:54.582 24828-24828/com.example.jackoyee.geopics D/ViewRootImpl: hardware acceleration is enabled, this = ViewRoot{2fb126d Toast,ident = 3}
08-21 18:29:54.612 24828-24878/com.example.jackoyee.geopics D/OpenGLRenderer: CanvasContext() 0x7f82ef2800 initialize window=0x7f85b9c810, title=Toast
08-21 18:29:54.612 24828-24828/com.example.jackoyee.geopics D/Surface: Surface::allocateBuffers(this=0x7f85b9c800)
08-21 18:29:54.612 24828-24878/com.example.jackoyee.geopics D/Surface: Surface::connect(this=0x7f85b9c800,api=1)
08-21 18:29:54.613 24828-24878/com.example.jackoyee.geopics W/libEGL: [ANDROID_RECORDABLE] format: 1
08-21 18:29:54.613 24828-24878/com.example.jackoyee.geopics D/mali_winsys: new_window_surface returns 0x3000
08-21 18:29:54.616 24828-24828/com.example.jackoyee.geopics V/InputMethodManager: onWindowFocus: android.support.v7.widget.AppCompatEditText{b895de8 VFED..CL. .F....ID 22,836-522,956 #7f08007f app:id/notes} softInputMode=32 first=false flags=#81810100
08-21 18:29:54.621 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [+]r_hnd(0x7f8fdc46c0), client(48), share_fd(68)
08-21 18:29:54.622 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: register, handle(0x7f8fdc46c0) (w:269 h:88 s:272 f:0x1 u:0x000b00)
08-21 18:29:54.622 24828-24878/com.example.jackoyee.geopics D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 92, 122, 85, 162
08-21 18:29:54.653 24828-24878/com.example.jackoyee.geopics V/RenderScript: 0x7f81c4a000 Launching thread(s), CPUs 4
08-21 18:29:55.570 24828-24878/com.example.jackoyee.geopics D/Surface: Surface::disconnect(this=0x7f85b9c800,api=1)
08-21 18:29:55.578 24828-24878/com.example.jackoyee.geopics D/GraphicBuffer: unregister, handle(0x7f8fdc46c0) (w:269 h:88 s:272 f:0x1 u:0x000b00)
08-21 18:29:55.579 24828-24878/com.example.jackoyee.geopics I/[MALI][Gralloc]: [-]r_hnd(0x7f8fdc46c0), client(48), share_fd(68)
08-21 18:29:55.580 24828-24878/com.example.jackoyee.geopics D/Surface: Surface::disconnect(this=0x7f85b9c800,api=1)
08-21 18:29:55.593 24828-24828/com.example.jackoyee.geopics D/WindowClient: Remove from mViews: android.widget.LinearLayout{898c716 V.E...... ......I. 0,0-269,88}, this = android.view.WindowManagerGlobal@36398d6
 service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write auth==null;
    }
  }
}
  service firebase.storage {
      match /b/{bucket}/o {
        match /{allPaths=**} {
          allow read, write;
        }
      }
    }