i've send my image from another activity to the final activity, and when i upload the image to activity there's none of them in the storage. when i upload to firebase it's a success but it turn out the data is empty
and i using this method to upload the image to firebase
lanjut.setOnClickListener (new View.OnClickListener ( ) {
@Override
public void onClick(View v) {
DatabaseCicilan6 databaseCicilan6 = new DatabaseCicilan6 (pendapatanperbulan, kategoripekerjaan, tempatkerja, jabatankerja,
alamatkerja, lamabekerja, alamatnow, kotanow, kecamatannow, kelurahannow,
rtnow, rwnow, alamatktp, kotaktp, kecamatanktp, kelurahanktp, rtktp, rwktp,
nohp, hubungan, namakontak, nohp2, hubungan2, namakontak2, Payment1, Payment2,
Payment3, Payment4, Payment5, Payment6, imageUri, imageUri2, imageUri3, tenor6, cicilan6,
tipebarang, hargabarang, dphp, fullName, nik, phoneNumber, date, currentDateandTime,
currentDate, tanggalpengajuan);
DatabaseCicilan9 databaseCicilan9 = new DatabaseCicilan9 (pendapatanperbulan, kategoripekerjaan, tempatkerja, jabatankerja,
alamatkerja, lamabekerja, alamatnow, kotanow, kecamatannow, kelurahannow,
rtnow, rwnow, alamatktp, kotaktp, kecamatanktp, kelurahanktp, rtktp, rwktp,
nohp, hubungan, namakontak, nohp2, hubungan2, namakontak2, Payment1, Payment2,
Payment3, Payment4, Payment5, Payment6, Payment7, Payment8, Payment9, imageUri,
imageUri2, imageUri3, tenor9, cicilan9, tipebarang, hargabarang, dphp, fullName,
nik, phoneNumber, date, currentDateandTime, currentDate, tanggalpengajuan);
if (getIntent ( ).hasExtra ("tenor6")) {
reference.child ("Pending").child (currentDateandTime).setValue (databaseCicilan6);
} else {
reference.child ("Pending").child (currentDateandTime).setValue (databaseCicilan9);
}
startActivity (new Intent (getApplicationContext ( ), PengajuanBerhasil.class));
}
});
}
and this is how i send the image from the the other activity
intent.putExtra("imageUri", (imageUri).toString ());
startActivity(intent);
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult (requestCode, resultCode, data);
if(requestCode == 100) {
Bitmap bitmap = (Bitmap) data.getExtras ( ).get ("data");
ByteArrayOutputStream bytes = new ByteArrayOutputStream ( );
bitmap.compress (Bitmap.CompressFormat.JPEG, 0, bytes);
String path = MediaStore.Images.Media.insertImage (getApplicationContext ( ).getContentResolver ( ), bitmap, String.valueOf (UUID.randomUUID()), null);
imageUri = Uri.parse (path);
imageView.setImageURI (imageUri);
}
}
i hope someone can help me with this problem