I have developed parse push notification in my app.
What I want now push notification should clear automatically from notification bar without any click on it after 10 min.Is it possible?
I have developed parse push notification in my app.
What I want now push notification should clear automatically from notification bar without any click on it after 10 min.Is it possible?
May be this will do the trick please do the required changes
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager nMgr = (NotificationManager) getApplicationContext().getSystemService(ns);
nMgr.cancel(NOTIF_ID);
}
}, 600000);
Sure, implement any handler that will wait, and after it remove your notification.
Here is description how to remove notification.