I have an notification that works fine yesterday, the notification not appears and I don't remember I had touched the code.. that notification must be appears when I get the desired value and must open a pop up dialog we user touch it.
can anyone help please?
the notification code - in side service-:
Intent notifyIntent = new Intent(context.getApplicationContext(), PopUp.class); notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //how I tried to pass data notifyIntent.putExtra("text1", text1); notifyIntent.putExtra("text2", text2); PendingIntent pIntent = PendingIntent.getActivity(context, 1, notifyIntent, 0); // build notification // the addAction re-use the same intent to keep the example short Notification n = new NotificationCompat.Builder(context,CHANNEL_ID2) .setContentTitle("check this") .setSmallIcon(R.drawable.ic_delete) .setContentIntent(pIntent) .build(); NotificationManager notificationManager =(NotificationManager)getSystemService(NOTIFICATION_SERVICE); notificationManager.notify(0, n); I'm using android studio emulator API 30 in the same service class I have a Notification and it is appearing to indicate that the service is working in the background, except the Notification that I but its code above it is not working suddenly
I don't know what is the problem, please help