Is it possible to access the notification led without creating a new notification?
I would like to make it change colors over time but when I just change the color of an existing notification it is not smooth and only works when the device is locked.
No, you can't do this. Android API doesn't have any method which would allow it.
Related
I created an android app and set up a push notification which works perfectly in all android devices below marshmallow. I understand that, initially the permission is disabled. I needed some features like camera, I achieved this by prompting required permission. Is there any way like this to on notification. If not how to go to notification permission giving activity programmatically
Thanks in advance
I had a similar problem but with O. Turns out that notifications from O on must be assigned to a Channel.
https://developer.android.com/training/notify-user/channels.html
Is there any way to prevent a notification be shown on Android Wear device? I know it's possible by using setOngoing(true) but I don't want my notification to be ongoing.
you should call setLocalOnly(true) on the NotificationCompat.Builder.
From the documentation
Set whether or not this notification should not bridge to other
devices.
you can read more here
Is it possible to create wearable notifications without using the notification builder?
I already create a notification via new Notification on newer devices and would like to keep that code and still add the Wearable notification to my existing one. Is this possible, or is everything connected to the builder helper class for now?
It seems that there is no WearableNotifications.Builder class anymore in the newest SDK.
But you need to do nothing to simply let your Notification show on Android Wear Devices.
If you want to have a slightly better look for your Notifications you can use WearableExtender to add Android Wear specific actions, pages and layout options.
The WearableNotifications.Builder class is only needed if you want to add 'wearable extensions' to your notification. The normal notifications shown by your app are displayed also on the wearable connected to your device without any further integration work.
I need to monitor the status of the notification LED on an android device. I've seen several post that explains how to customize the LED behavior (i.e. Changing LED color for notifications) however I would like to receive an event (using a receiver) whenever the LED changes its status or an app triggers a blink, regardless of which app caused the blink.
Is it possible to receive these event?
If yes, which intent filter should I use to receiver this kind of event?
Thanks!
Is it possible to receive these event?
Definitely not in the Android SDK. A custom Android build packaged as a ROM mod may be able to determine this, at least for OS-triggered uses of the LED. System-level use of the LED (e.g., charging status) may not be visible to Android at all.
So, i have a service working in the background (when the application is closed) which connects to internet every 2 minutes and gets some data from a database, and if something's wrong i want to alert the user with some kind of a beep tone and a message on the screen or even better in the notification bar. Is it possible to do this and if yes, how?
I think the nicest solution would be to use a SystemBar Notification.
Using the Notification.Builder you can add a custom sound to your notification using setSound(Uri sound).
What you think of is called ´Notification´ in Android. You can find more information here on how to create some.