sdk 0.64.0. check dht setting on startup.
This commit is contained in:
parent
ea8ac783a8
commit
4627e284fa
5 changed files with 13 additions and 3 deletions
|
@ -210,8 +210,8 @@ dependencies {
|
||||||
implementation 'com.facebook.fresco:animated-gif:1.10.0'
|
implementation 'com.facebook.fresco:animated-gif:1.10.0'
|
||||||
implementation 'com.google.firebase:firebase-messaging:20.1.0'
|
implementation 'com.google.firebase:firebase-messaging:20.1.0'
|
||||||
|
|
||||||
__32bitImplementation files('libs/lbrysdk-0.62.0-release__arm.aar')
|
__32bitImplementation files('libs/lbrysdk-0.64.0-release__arm.aar')
|
||||||
__64bitImplementation files('libs/lbrysdk-0.62.0-release__arm64.aar')
|
__64bitImplementation files('libs/lbrysdk-0.64.0-release__arm64.aar')
|
||||||
|
|
||||||
if (enableHermes) {
|
if (enableHermes) {
|
||||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -57,6 +57,7 @@ import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
|
||||||
import com.swmansion.reanimated.ReanimatedPackage;
|
import com.swmansion.reanimated.ReanimatedPackage;
|
||||||
import com.RNFetchBlob.RNFetchBlobPackage;
|
import com.RNFetchBlob.RNFetchBlobPackage;
|
||||||
|
|
||||||
|
import io.lbry.browser.reactmodules.UtilityModule;
|
||||||
import io.lbry.browser.reactpackages.LbryReactPackage;
|
import io.lbry.browser.reactpackages.LbryReactPackage;
|
||||||
import io.lbry.browser.reactmodules.BackgroundMediaModule;
|
import io.lbry.browser.reactmodules.BackgroundMediaModule;
|
||||||
import io.lbry.lbrysdk.LbrynetService;
|
import io.lbry.lbrysdk.LbrynetService;
|
||||||
|
@ -153,7 +154,13 @@ public class MainActivity extends FragmentActivity implements DefaultHardwareBac
|
||||||
// Register the receiver to emit download events
|
// Register the receiver to emit download events
|
||||||
registerDownloadEventReceiver();
|
registerDownloadEventReceiver();
|
||||||
|
|
||||||
// Start the daemon service if it is not started
|
// Start the sdk service if it is not started
|
||||||
|
// Check the dht setting
|
||||||
|
SharedPreferences sp = getSharedPreferences(MainActivity.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
|
||||||
|
android.util.Log.d("ReactNativeJS", "getBooleanValue=" + sp.getBoolean(UtilityModule.DHT_ENABLED, false));
|
||||||
|
LbrynetService.setDHTEnabled(sp.getBoolean(UtilityModule.DHT_ENABLED, false));
|
||||||
|
android.util.Log.d("ReactNativeJS", "DHTEnabled=" + LbrynetService.isDHTEnabled());
|
||||||
|
|
||||||
serviceRunning = isServiceRunning(this, LbrynetService.class);
|
serviceRunning = isServiceRunning(this, LbrynetService.class);
|
||||||
if (!serviceRunning) {
|
if (!serviceRunning) {
|
||||||
CurrentLaunchTiming.setColdStart(true);
|
CurrentLaunchTiming.setColdStart(true);
|
||||||
|
|
|
@ -56,6 +56,7 @@ public class UtilityModule extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
public static final String ACTION_NOTIFICATION_LATER = "io.lbry.browser.ACTION_NOTIFICATION_LATER";
|
public static final String ACTION_NOTIFICATION_LATER = "io.lbry.browser.ACTION_NOTIFICATION_LATER";
|
||||||
|
|
||||||
|
// Setting keys from React Native
|
||||||
public static final String RECEIVE_SUBSCRIPTION_NOTIFICATIONS = "receiveSubscriptionNotifications";
|
public static final String RECEIVE_SUBSCRIPTION_NOTIFICATIONS = "receiveSubscriptionNotifications";
|
||||||
|
|
||||||
public static final String RECEIVE_REWARD_NOTIFICATIONS = "receiveRewardNotifications";
|
public static final String RECEIVE_REWARD_NOTIFICATIONS = "receiveRewardNotifications";
|
||||||
|
@ -64,6 +65,8 @@ public class UtilityModule extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
public static final String RECEIVE_CREATOR_NOTIFICATIONS = "receiveCreatorNotifications";
|
public static final String RECEIVE_CREATOR_NOTIFICATIONS = "receiveCreatorNotifications";
|
||||||
|
|
||||||
|
public static final String DHT_ENABLED = "dhtEnabled";
|
||||||
|
|
||||||
// the last language set to be loaded
|
// the last language set to be loaded
|
||||||
private static final String LANGUAGE_SETTING_KEY = "language";
|
private static final String LANGUAGE_SETTING_KEY = "language";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue