How Do I Make An Android Local Notification That Doesn't Pop-up, Just Shows Up On The Notification List?
I am making a type of alarm app. I have a special alarm screen that I show when the alarm time comes. That works fine. But I also want there to be an entry in the notifications list if the user snoozes the alarm. But when I try to use a regular Notification using NotificationBuilder, it pops up on the screen at the same as my alarm activity (which is not full screen - uses transparency). There must be a way to get the notification into the list, so the user will see it there, but not have it pop up at alarm time.
You need to use a low priority for channel you created
NotificationManager.IMPORTANCE_LOW or NotificationManager.IMPORTANCE_MIN
From Android Oreo, you need to use notification channels for creating Notifications.
For Example : When you create a channel, with id "Alerts" , you can define its properties like, its importance , sound etc...
The various Importance Attributes used are as follows:
IMPORTANCE_DEFAULT: Default notification importance: shows everywhere, makes noise, but does not visually intrude. Constant Value: 3
IMPORTANCE_HIGH : Higher notification importance: shows everywhere, makes noise and peeks. May use full screen intents.
[This will keep showing over other apps and again like whatsapp message notification] This works so because of its importance. Constant Value: 4
IMPORTANCE_LOW Low notification importance: shows everywhere, but is not intrusive. Constant Value: 2
IMPORTANCE_MIN Min notification importance: only shows in the shade, below the fold. Constant Value: 1
So once you define a channels properties it could be changed by only the user through notification intent. Which i mentioned here : https://stackoverflow.com/a/54199316/7039593
Using a low priority / min min importance may solve your problem
- → 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