How To Remove Notification From Status Bar When Clicking The My Footer Icon
I want to remove the notification from status bar when clicking on footer icon. How to call this method outside the service class:
Is there any other solution to remove notification by clicking the custom button?
You can call the notification outside service class (such as activity using button click) in this way:
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.cancel(MY_NOTIFICATION_ID);
You can see the detail of it at https://developer.android.com/training/notify-user/build-notification#Removing.
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View