Use the following two code line to collapse the notification bar.
Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
context.sendBroadcast(it);
More Related Contents:
- show remaining minutes instead of hours
- Which solution i can use for guaranteed notifications (it is not about push notification)? [closed]
- How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?
- Android Push Notifications: Icon not displaying in notification, white square shown instead
- Open application after clicking on Notification
- Push Notifications when app is closed
- How exactly to use Notification.Builder
- Create custom notification, android
- windowSoftInputMode=”adjustResize” not working with translucent action/navbar
- Prevent status bar for appearing android (modified)
- How to clear a notification in Android
- How to add a notification badge/count to application icon on Sony Xperia devices?
- NotificationCompat.Builder deprecated in Android O
- Android notification is not showing
- Why is my smallIcon for Notifications always greyed out?
- Android Material: Status bar color won’t change
- getIntent() Extras always NULL
- Event OnClick for a button in a custom notification
- How to send notification to specific users with FCM?
- Send a notification when the app is closed
- No notification sound when sending notification from firebase in android
- Clearing notification after a few seconds
- android pending intent notification problem
- Android accessibility service detect notification
- i want show notification at 8:00 am everyday
- How to read all the coming notifications in android
- click on notification to go current activity
- Light up screen when notification received android
- Transparent status bar (with visible navigation bar)
- Extract notification text from parcelable, contentView or contentIntent