This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L116-L130 | |
@Override | |
public boolean dispatchKeyEvent(KeyEvent event) | |
{ | |
// This method is called on key down and key up, so avoid being called twice | |
if (this.bitmovinPlayerView != null && event.getAction() == KeyEvent.ACTION_DOWN) | |
{ | |
if (this.handleUserInput(event.getKeyCode())) | |
{ | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//snippet from: https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L64-L68 | |
playerConfiguration.getStyleConfiguration().setPlayerUiJs("file:///android_asset/bitmovinplayer-ui.js"); | |
// JS File can be found -> https://github.com/bitmovin/bitmovin-player-android-samples/tree/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/assets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application | |
android:banner="@drawable/banner" > | |
... | |
<activity | |
android:name="com.example.android.MainActivity" | |
android:label="@string/app_name" > | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String TAG = "DeviceTypeRuntimeCheck"; | |
UiModeManager uiModeManager = (UiModeManager) getSystemService(UI_MODE_SERVICE); | |
if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) { | |
Log.d(TAG, "Running on a TV Device"); | |
} else { | |
Log.d(TAG, "Running on a non-TV Device"); | |
} |
NewerOlder