nexxPLAY
Search
K
Comment on page

Android TV Channel

Basic Integration

Make the following changes to your Projects build.gradle
...
allprojects{
repositories{
maven { url "https://www.myget.org/F/3qnexx/maven" }
}
}
...
add the following dependencies
dependencies {
implementation "tv.nexx.android:tvrecommendations:1.0.03"
}
Configure the TV Channel Row by adding the following Settings to your values/strings.xml:
<resources>
<string name="recommendations_channel_name">Initial Channel Name</string>
<string name="recommendations_domain" translatable="false">YOUR_DOMAIN_ID</string>
<string name="recommendations_feed_hash" translatable="false">YOUR_FEED_HASH</string>
<string name="recommendations_linkintent_uri" translatable="false">YOUR_REGISTERED_APP_INTENT_URI</string>
<!-- only needed, if the Feed is secured with a Secret -->
<string name="recommendations_feed_secret" translatable="false">YOUR_FEED_SECRET</string>
<!-- this Parameter can be obtained from 3Q nexx or nexxOMNIA -->
<string name="recommendations_app" translatable="false">YOUR_APP_ID</string>
</resources>
Prepare the necessary Image Asset (Channel Logo JPG) and place them under src/main/res/drawable/
Asset
Dimensions
Usage
recommendations_icon.jpg
80x80px
Icon to be shown near the Channel Contents

Handling Intent

Once a User clicks on any Item of the Channel Row, your App is automatically opened with the corresponding Media. This will only work, if the "recommendations_linkintent_uri" String is configured correctly. Futhermore, nexxOMNIA must have the same URI in the Feed Configuration and a valid Template for constructing the Media IDs, that your App can understand.

Enhanced Methods

It is possible to update/refresh/reconfigure the Recommendation Row from your App directly with the following Methods:
import tv.nexx.android.recommendations.RecommendationManager;
import tv.nexx.android.recommendations.RecommendationConfiguration;
public class MainActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
...
RecommendationManager manager= new RecommendationManager(this.getContext());
//update the Configuration and refresh the Feed
RecommendationConfigurationconfig=new RecommendationConfiguration(
new HashMap<String, Object>() {{
put("language","es");
put("feedUpdateInterval", 30);
}}
);
manager.updateConfiguration(config);
//updating only the Channel without any new Configuration
manager.updateChannel();
//enabling background Sync and automatic Updates
manager.enableAutoUpdate();
}
}
The Recommendation will normally automatically be created and updated by a System Intent on Installation. Nevertheless, updating it manually with these Methods wont disturb the (possibly) existing initial Settings.

WatchNext

WatchNext is an automatic Row on androidTV, that automatically syncs the Users View Progress and displays them on the StartPage. This is handled by nexxPLAY alone, the Recommendation SDK is not needed for this.
Both Systems though need a valid App Intent URI and a Logic, on how nexxOMNIA/nexxPLAY can construct the Apps Media Reference. Contact 3Q nexx, if the Details are unclear.