My own app, a VPN app, currently relay on the notification bar and Android own VPN status symbol to communicate its status to users.
On Android TV a user has no way to tell if he is connected to the VPN or not. This is also a slight security problem (for malicious VPN apps).
The only thing I found is the now playing behaviour for media apps.
My question is: Is there any way to change the own launcher icon dynamically or have some other way of presenting the current background status to the user without forcing the user to open the app?
You can use a notification, although it is considered a recommendation in the Android TV system. Changing the launcher icon is not supported.
Here's a sample notification that works on Android TV.
Notification notification = new NotificationCompat.BigPictureStyle(
new NotificationCompat.Builder(mContext)
.setContentTitle(video.getString("title"))
.setContentText(mDescription)
.setPriority(mPriority)
.setLocalOnly(true)
.setOngoing(true)
.setColor(mContext.getResources().getColor(android.R.color.holo_green_dark))
.setCategory(Notification.CATEGORY_RECOMMENDATION)
.setLargeIcon(thumbnail)
.setSmallIcon(R.drawable.ic_note)
.setContentIntent(launchApp(mContext))
.setExtras(null))
.build();
return notification;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With