Могу ли я знать, в чем проблема, если эта кодировка остановила приложение и покажет, что эта часть имеет проблему. пожалуйста помогите спасибо
Ошибка
E/AndroidRuntime: FATAL EXCEPTION: Firebase-MyFirebaseMessaging
Process: com.example.mychat, PID: 6510
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at com.example.mychat.Notifications.MyFirebaseMessaging.onMessageReceived(MyFirebaseMessaging.java:32)
at com.google.firebase.messaging.FirebaseMessagingService.zzd(Unknown Source:60)
at com.google.firebase.iid.zzg.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:784)
Код
@Override
public void onMessageReceived(RemoteMessage remoteMessage){
super.onMessageReceived(remoteMessage);
String sented = remoteMessage.getData().get("sented");
FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
if (firebaseUser != null && sented.equals(firebaseUser.getUid())){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
sendOreoNotification(remoteMessage);
}else {
sendNotification(remoteMessage);
}
}
}