Android: get a handler to the app's icon from an SDK - android

I am building an Android SDK which sometimes need to display notifications to the user in the notification drawer:
Naturally, I would like to use the app icon when setting the setSmallIcon() property of the NotificationCompat.Builder. The problem is that an SDK does not know in advance what is the icon of its embracing app.
Is there a way to get a reference to the app icon asset programatically, in run time?

Related

Flutter Dynamic Local Notification Icon (Android)

How do I have changing Icons similar to how Instagram notifications icons changes by who sends the message.
The way I understand it is notifications can only access image in drawable and mipmap that once the apk is built they can only access that image. What I want to do is allow user to give any image and make it the notifications Icon
Please check _showBigPictureNotificationURL() method from the plugin:
flutter_local_notifications

How to set app icon using an API in android studio

I am trying to change app icon dynamically from backend, i don't know if that is possible or not but since we are able to use activity-alias to change icon, this looks feasible.

Cordova app status bar image notification

I am trying to build an android app using Cordova. Is there any plugin to show an image notification in the status bar.
Not icons but full image like this
http://imgur.com/XDj7fXI
If your app also needs to record GPS data in the background, then try this plugin:
https://www.npmjs.com/package/cordova-plugin-mauron85-background-geolocation
You have the option to add an image/icon and various other notification settings for when the app is in the background:
option.notificationTitle
option.notificationText
option.notificationIcon
option.notificationIconColor
If you don't want or need background GPS, then I haven't seen a plugin that has that functionality so far.
I hope this helps.

Custom small icon for notification for phonegap android plugin (Sencha Touch 2)

I am building a custom phonegap/cordova android plugin which shows notifications (which is only a part of my plugin). I am using the android notifications builder for the same. However, for the notifications builder I need to use setSmallIcon() to set the notification icon. However, this requires a resource id integer. For the big icon, I could use the bitmap from my Sencha Touch App resources location, however for the small icon, I do not know how I can get the resource id of that. Is there a way I can do that?

Android: Show Notifications on launcher icon

How to show notifications on launcher icon(such as native Messages,email app) in android like iphone.
Android doesnt provide a way to do this. It always references the same app launcher icon when you compile your project into an apk. There is no way to change this later on. A widget can be an alternative.

Categories

Resources