Notification Won't Appear On Android TV
I am playing with notifications on Android TV. I have not been able to get a notification to appear on the screen though. I am using the Nexus player which is on Android 6.0. When
Solution 1:
A TV notification is going to be different in some ways from a phone notification and may have specific additional parameters. Try adding a few more attributes. Here's a snippet of a TV notification I have implemented in one of my apps which works.
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;
Solution 2:
Since Android TV works a bit more restricted as Android smartphones you need to instantiate and set the TvExtender
But since it is flagged with @SystemApi annotation, it's not that easy..
Post a Comment for "Notification Won't Appear On Android TV"