Handle lbry:// url scheme, and download notification fixes. (#139)
This commit is contained in:
parent
4fbf90654e
commit
7d2e4c1e8c
6 changed files with 76 additions and 15 deletions
src/main/java/io/lbry/browser
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue