Notification notification = new Notification(R.drawable.asterisk_sign, text, System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0);
notification.setLatestEventInfo(this, getText(R.string.app_name), text, contentIntent);
mNM.notify(R.string.minutemaid_service_started, notification);
This is an example of how to make a notification in the notification panel that triggers an action when it is selected.
source
share