the application must call the user to the cabinet at the click of a button here is the source code itself push works but for one user holder.call.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FirebaseDatabase.getInstance().getReference().child("Tokens").child(user.getUid().toString().trim()).child("token").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { String usertoken=dataSnapshot.getValue(String.class); sendNotifications(usertoken, user.getName().toString().trim(),Message.getText().toString().trim()); } @Override public void onCancelled(@NonNull ..

Read more

so I have bottomNavigationView that holds tabs and navigates to fragments using setOnNavigationItemSelectedListener() in one of the fragments I need to display google maps, but I’m getting this error: java.lang.NullPointerException: Attempt to invoke virtual method ‘void com.google.android.gms.maps.SupportMapFragment.getMapAsync (com.google.android.gms.maps.OnMapReadyCallback)’ on a null object reference even though I initialized SupportMapFragment right above the error line getMapAsync() like ..

Read more