SHARE
TWEET

Untitled

a guest Jun 16th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void onItemSelected(AdapterView<?> adapterView, View view,
  2.                                            int position, long id) {
  3.                     Object item = adapterView.getItemAtPosition(position);
  4.                     NameSelected = item.toString();
  5.                     pris = NameSelected;
  6.                     ref = FirebaseDatabase.getInstance().getReference().child("Faculty_Database");
  7.                     ref.orderByChild("Name").equalTo(pris).addValueEventListener(new ValueEventListener(){
  8.                         @Override
  9.                         public void onDataChange(DataSnapshot dataSnapshot) {
  10.                             for(DataSnapshot datas: dataSnapshot.getChildren()){
  11.                                 key = datas.child("UID").getValue(String.class);
  12.                             }
  13.                         }
  14.      
  15. databaseReference = FirebaseDatabase.getInstance().getReference().child("Faculty_Database").child(key).child("Received"); // this is where I'm getting the error
  16.                                 Map<String, Object> mapToUpload = new HashMap<>();
  17.                                 mapToUpload.put("imageUrl", downloadUri.toString());
  18.                                 mapToUpload.put("Data", studentDetails);
  19.                                 databaseReference.child(StudentRecordIDFromServer).setValue(mapToUpload);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top