diff --git a/app/build.gradle b/app/build.gradle index d5b79c76..2dd21820 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -210,8 +210,8 @@ dependencies { implementation 'com.facebook.fresco:animated-gif:1.10.0' implementation 'com.google.firebase:firebase-messaging:20.1.0' - __32bitImplementation files('libs/lbrysdk-0.62.0-release__arm.aar') - __64bitImplementation files('libs/lbrysdk-0.62.0-release__arm64.aar') + __32bitImplementation files('libs/lbrysdk-0.64.0-release__arm.aar') + __64bitImplementation files('libs/lbrysdk-0.64.0-release__arm64.aar') if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/"; diff --git a/app/libs/lbrysdk-0.62.0-release__arm.aar b/app/libs/lbrysdk-0.64.0-release__arm.aar similarity index 93% rename from app/libs/lbrysdk-0.62.0-release__arm.aar rename to app/libs/lbrysdk-0.64.0-release__arm.aar index a93f5cc1..70511baf 100644 Binary files a/app/libs/lbrysdk-0.62.0-release__arm.aar and b/app/libs/lbrysdk-0.64.0-release__arm.aar differ diff --git a/app/libs/lbrysdk-0.62.0-release__arm64.aar b/app/libs/lbrysdk-0.64.0-release__arm64.aar similarity index 93% rename from app/libs/lbrysdk-0.62.0-release__arm64.aar rename to app/libs/lbrysdk-0.64.0-release__arm64.aar index 2e831497..8219fecf 100644 Binary files a/app/libs/lbrysdk-0.62.0-release__arm64.aar and b/app/libs/lbrysdk-0.64.0-release__arm64.aar differ diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 917dca52..e2506684 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -57,6 +57,7 @@ import com.swmansion.gesturehandler.react.RNGestureHandlerPackage; import com.swmansion.reanimated.ReanimatedPackage; import com.RNFetchBlob.RNFetchBlobPackage; +import io.lbry.browser.reactmodules.UtilityModule; import io.lbry.browser.reactpackages.LbryReactPackage; import io.lbry.browser.reactmodules.BackgroundMediaModule; import io.lbry.lbrysdk.LbrynetService; @@ -153,7 +154,13 @@ public class MainActivity extends FragmentActivity implements DefaultHardwareBac // Register the receiver to emit download events 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); if (!serviceRunning) { CurrentLaunchTiming.setColdStart(true); diff --git a/app/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java b/app/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java index 1b216316..32f77228 100644 --- a/app/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java +++ b/app/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java @@ -56,6 +56,7 @@ public class UtilityModule extends ReactContextBaseJavaModule { 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_REWARD_NOTIFICATIONS = "receiveRewardNotifications"; @@ -64,6 +65,8 @@ public class UtilityModule extends ReactContextBaseJavaModule { public static final String RECEIVE_CREATOR_NOTIFICATIONS = "receiveCreatorNotifications"; + public static final String DHT_ENABLED = "dhtEnabled"; + // the last language set to be loaded private static final String LANGUAGE_SETTING_KEY = "language";