I would like to control Launching Application from notification bar. So i would like to intercept any action in any icon in this bar. the code given below give an example of how a notification icon start the application that much with it.
private void handleCommand(Intent intent){
// In this sample, we'll use the same text for the ticker and the expanded notification
CharSequence text = getText(R.string.service_running);
// Set the icon, scrolling text and timestamp
Notification notification = new Notification(R.drawable.statusbar_icon, text,
System.currentTimeMillis());
// The PendingIntent to launch our activity if the user selects this notification
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
new Intent(this, AppLockerActivity.class), 0);
// Set the info for the views that show in the notification panel.
notification.setLatestEventInfo(this, text,
text, contentIntent);
startForegroundCompat(R.string.service_running, notification);
startMonitorThread((ActivityManager)this.getSystemService(Context.ACTIVITY_SERVICE));
}
I would like to detect all the intent and implement a service of authentication that need a password befor running applications from the notification bar.
Ok so, if i understood well the question...why don't make
Intent
to send to some kind ofLogin
section?Like this: