Guest User

Untitled

a guest
Jan 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. java.lang.IllegalStateException: Unrecognized type of request: Request{com.google.android.gms.tasks.zzu@f30b587}
  2.  
  3. Save.setOnClickListener(new View.OnClickListener() {
  4. @Override
  5. public void onClick(View v) {
  6. saveusersetupinfirmation();
  7. }
  8. });
  9.  
  10. profileimage.setOnClickListener(new View.OnClickListener() {
  11. @Override
  12. public void onClick(View v) {
  13. Intent galleryIntent = new Intent();
  14. galleryIntent.setAction(Intent.ACTION_GET_CONTENT);
  15. galleryIntent.setType("image/*");
  16. startActivityForResult(galleryIntent, GALLARY_PICK);
  17. }
  18. });
  19.  
  20. userRef.addValueEventListener(new ValueEventListener() {
  21. @Override
  22. public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
  23. String image = dataSnapshot.child("profileimage").getValue(String.class);
  24. Picasso.get()
  25. .load(image)
  26. .placeholder(R.drawable.profile)
  27. .into(profileimage, new Callback() {
  28. @Override
  29. public void onSuccess() {
  30.  
  31. }
  32.  
  33. @Override
  34. public void onError(Exception e) {
  35. System.out.println(e);
  36. Log.d("BFIT1", String.valueOf(e));
  37. e.printStackTrace();
  38.  
  39. Toast.makeText(SetupActivity.this,"Error!",Toast.LENGTH_SHORT).show();
  40.  
  41. }
  42. });
  43. }
  44.  
  45. @Override
  46. public void onCancelled(@NonNull DatabaseError databaseError) {
  47.  
  48. }
  49. });
  50. }
Add Comment
Please, Sign In to add comment