mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-05-12 15:59:26 -05:00
channels: first step
This commit is contained in:
@@ -67,11 +67,11 @@ android {
|
||||
flavorDimensions "default"
|
||||
|
||||
productFlavors {
|
||||
ubeta {
|
||||
stbeta {
|
||||
// matchingFallbacks = ['lite']
|
||||
applicationIdSuffix ".beta"
|
||||
}
|
||||
uorig {
|
||||
storig {
|
||||
// matchingFallbacks = ['lite']
|
||||
}
|
||||
}
|
||||
@@ -125,10 +125,10 @@ dependencies {
|
||||
|
||||
implementation project(path: ':common')
|
||||
|
||||
ubetaImplementation project(path: ':leanbackassistant')
|
||||
stbetaImplementation project(path: ':leanbackassistant')
|
||||
|
||||
// Add the Firebase Crashlytics SDK.
|
||||
ubetaImplementation('com.google.firebase:firebase-crashlytics:' + firebaseCrashlyticsVersion) {
|
||||
stbetaImplementation('com.google.firebase:firebase-crashlytics:' + firebaseCrashlyticsVersion) {
|
||||
transitive = true
|
||||
}
|
||||
}
|
||||
|
||||
+24
-5
@@ -1,10 +1,15 @@
|
||||
package com.liskovsoft.smartyoutubetv2.tv.ui.main;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import com.liskovsoft.sharedutils.mylogger.Log;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.views.ViewManager;
|
||||
|
||||
public class SplashActivity extends Activity {
|
||||
private static final String TAG = SplashActivity.class.getSimpleName();
|
||||
private static final String CHANNELS_RECEIVER_CLASS_NAME = "com.liskovsoft.leanbackassistant.channels.RunOnInstallReceiver";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -12,12 +17,26 @@ public class SplashActivity extends Activity {
|
||||
ViewManager viewManager = ViewManager.instance(this);
|
||||
viewManager.startDefaultView(this);
|
||||
|
||||
updateChannels();
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
// TODO: implement Android TV channels
|
||||
//private void updateRecommendations() {
|
||||
// Intent recommendationIntent = new Intent(mContext, UpdateRecommendationsService.class);
|
||||
// mContext.startService(recommendationIntent);
|
||||
//}
|
||||
private void updateChannels() {
|
||||
Class<?> clazz = null;
|
||||
|
||||
try {
|
||||
clazz = Class.forName(CHANNELS_RECEIVER_CLASS_NAME);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// NOP
|
||||
}
|
||||
|
||||
if (clazz != null) {
|
||||
Log.d(TAG, "Starting channels receiver...");
|
||||
Intent intent = new Intent(this, clazz);
|
||||
sendBroadcast(intent);
|
||||
} else {
|
||||
Log.e(TAG, "Channels receiver class not found: " + CHANNELS_RECEIVER_CLASS_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string translatable="false" name="app_name"><![CDATA[SmartTube TV]]></string>
|
||||
<string translatable="false" name="browse_title"><![CDATA[SmartTube TV]]></string>
|
||||
<string translatable="false" name="app_name"><![CDATA[SmartTube Next]]></string>
|
||||
<string translatable="false" name="browse_title"><![CDATA[SmartTube Next]]></string>
|
||||
<string name="related_movies">Related Videos</string>
|
||||
<string name="vertical_grid_title"><![CDATA[Vertical Video Grid]]></string>
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string translatable="false" name="app_name"><![CDATA[SmartTube TV Beta]]></string>
|
||||
<string translatable="false" name="browse_title"><![CDATA[SmartTube TV Beta]]></string>
|
||||
<string translatable="false" name="app_name"><![CDATA[SmartTube Next Beta]]></string>
|
||||
<string translatable="false" name="browse_title"><![CDATA[SmartTube Next Beta]]></string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user