I have a notification in the status bar for my application:
Notification notification = new Notification(R.drawable.icon, null, System.currentTimeMillis()); Intent notificationIntent = new Intent(this.parent, MainActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(this.parent, 0, notificationIntent, 0); ... notification.flags = Notification.FLAG_ONGOING_EVENT; mNotificationManager.notify(NOTIFICATION_ID, notification);
The problem is that when you click the home button from the application (by clicking on the background), click on the notification in the list accessible from the status bar and it will launch a new copy of the action. All I want to do is resume the application (for example, when you release the home button and click on the application icon). Is there any way to create an intention to do this?
java android android-activity notifications
mazbox
source share