Reputation: 55
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!
Upvotes: 3
Views: 3065
Reputation: 55
I am getting "Unable to start auto-scan for 'Authorization' " after I try to install the channels. I am using files from ChannelSurfer, managed to make the provider and HOPEFULY the setup(still confused about it), but I'm stuck on this part... The console does not throw a single error but the TV says the above statement. Why does this happen and what are the possible fixes?
Upvotes: 0
Reputation: 11978
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.
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.
Upvotes: 1
Reputation: 13494
Based from this documentation, those implementing TV input services should normally do so by deriving from this class and providing their own session implementation based on TvInputService.Session
.
Your app manifest must declare your TvInputService
then specify the BIND_TV_INPUT
permission to allow the service to connect the TV input to the system.
<service android:name="com.example.sampletvinput.SampleTvInput"
android:label="@string/sample_tv_input_label"
android:permission="android.permission.BIND_TV_INPUT">
<intent-filter>
<action android:name="android.media.tv.TvInputService" />
</intent-filter>
<meta-data android:name="android.media.tv.input"
android:resource="@xml/sample_tv_input" />
</service>
You can check this example on GitHub.
Upvotes: 1