Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidTV TvInputService Implementation

I am having problems with implementing TvInputService.

I have all information from the server concerning channels(end/start times, Uri addresses, id, name, etc..)

My objective is to create an app to setup streaming channels from this information gotten from the server. I tried this http://developer.android.com/training/tv/tif/tvinput.html ... even thou I understand the theory (mostly), I am still new to this and because the website does not provide coding examples and thorough explanation of it, it is really frustrating. I also tried the Sample provided by android, but that is too complex for what I am trying to do, and it just confuses me even more.

Can someone help me out by explaining(simple way, if possible) with some examples all about TvInputService implementation? Thank you!

like image 333
Mokrab Avatar asked Mar 24 '26 05:03

Mokrab


1 Answers

You may want to use my library, ChannelSurfer, which greatly simplifies the development of TV input services.

There are a few main steps that you need to do to create an input service.

  1. Declare what channels are accessible.
  2. Declare what programs will be played on each channel
  3. When a user tunes to your channel, how will the video be displayed

This is done normally through SyncAdapters and services, although this library boils everything down to a single class that you create based on your own specifications.

There's an example app as well if you need more help.

like image 93
Nick Felker Avatar answered Mar 28 '26 02:03

Nick Felker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!