java - Is there a way to show a video in a remoteview notification on Android? -


i'm working in notification app android , customer has requested me insert video inside notification preview.

i know i'm able create notifications pictures , notifications custom views, when try add video custom view app gives me error:

fatal exception: main bad notification posted package com.codeversed.example.notifications: couldn't expand remoteviews for: statusbarnotification(pkg=com.codeversed.example.notifications user=userhandle{0} id=0 tag=null score=0 key=0|com.codeversed.example.notifications|0|null|10008: notification(pri=0 contentview=com.codeversed.example.notifications/0x1090089 vibrate=default sound=default defaults=0x7 flags=0x18 color=0x00000000 originalpackagename=n originaluserid=0 vis=private))

i suppose because videos aren't allowed remote views. know if limitation can sorted or if there way show videos on notifications?

regards,

no, cannot show video in notification. partially, because remoteviews not support surfaceview, textureview, or videoview need. partially, because party responsible showing video may not have rights (e.g., may not have internet access). remember you not 1 showing notificationsomebody else is. merely provide specification.


Comments