You may pass the parameter
PendingIntent.getActivity(getApplicationContext(), 0, new Intent(), 0)
instead of
null
on
notification.setLatestEventInfo(context, contentTitle, contentText, null);
More Related Contents:
- How to send parameters from a notification-click to an activity?
- Determine addAction click for Android notifications
- How to make notification intent resume rather than making a new intent?
- getIntent() Extras always NULL
- android pending intent notification problem
- Multiple notifications to the same activity
- Splash screen in android
- How to call another activity(class) from one activity? [closed]
- How to start new activity on button click
- How do I get extra data from intent on Android?
- How to open the Google Play Store directly from my Android application?
- Android Respond To URL in Intent
- Handle screen rotation without losing data – Android
- How to detect when phone is answered or rejected
- “Failure Delivering Result ” – onActivityForResult
- Android Share Intent for a Bitmap – is it possible not to save it prior sharing?
- Replacing default Phone app on Android 6 and 7 with InCallService
- Multiple MIME types in Android
- Android – Build a notification, TaskStackBuilder.addParentStack not working
- Trying to UNINSTALL_SHORTCUT but shortcut won’t go away
- overridePendingTransition does not work when FLAG_ACTIVITY_REORDER_TO_FRONT is used
- Launching an Android Application from the Browser
- Android BroadCastReceiver for volume key up and down
- Disable sound from NotificationChannel
- On Android 8.1 API 27 notification does not display
- How do I properly fire ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent?
- Android: Event ACTION_POWER_CONNECTED is not sent to my BroadcastReceiver
- Android – launch google map via web url
- How to load an image in image view from gallery?
- How to run an activity only once like Splash screen