Handle lbry:// url scheme, and download notification fixes. ()

This commit is contained in:
akinwale 2018-05-25 08:13:05 +01:00 committed by GitHub
parent 4fbf90654e
commit 7d2e4c1e8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 15 deletions
src/main/java/io/lbry/browser

View file

@ -31,7 +31,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
private static final int OVERLAY_PERMISSION_REQ_CODE = 101;
private static final int STORAGE_PERMISSION_REQ_CODE = 201;
private ReactRootView mReactRootView;
private ReactInstanceManager mReactInstanceManager;
@ -43,7 +43,11 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
* onResume method.
*/
private boolean serviceRunning;
protected String getMainComponentName() {
return "LBRYApp";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
@ -174,6 +178,14 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
super.onBackPressed();
}
}
@Override
public void onNewIntent(Intent intent) {
if (mReactInstanceManager != null) {
mReactInstanceManager.onNewIntent(intent);
}
super.onNewIntent(intent);
}
private boolean isServiceRunning(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);