2

I am implementing a widget for TV application in which I want to show streaming so I have to place SurfaceView in it. As widget has RemoteViews, how can I use SurfaceView to set value of SurfaceHolder? I have defined SurfaceView in xml. I have searched on internet but didn't find any help. I want instance of SurfaceView so that I can play with it.

Shahzeb
  • 3,696
  • 4
  • 28
  • 47

1 Answers1

3

As widget has RemoteViews, how can I use SurfaceView

That is not possible. SurfaceView is not available for use with app widgets, as is covered in the documentation.

Any alternative for SurfaceView

It is not possible to show a video from an app widget. At best, you can try to write your own home screen implementation that does this.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491