pending intent

This commit is contained in:
Akinwale Ariwodola 2020-03-10 22:06:57 +01:00
parent b7b6c05bd3
commit 914dee09fc

View file

@ -2,6 +2,7 @@ package io.lbry.browser;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.PendingIntent;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
@ -159,6 +160,14 @@ public class MainActivity extends FragmentActivity implements DefaultHardwareBac
ServiceHelper.start(this, "", LbrynetService.class, "lbrynetservice");
}
if (LbrynetService.serviceInstance != null) {
// TODO: Add a broadcast receiver to listen for the service started event, so that we can set this properly
Context context = getApplicationContext();
Intent contextIntent = new Intent(context, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, contextIntent, PendingIntent.FLAG_UPDATE_CURRENT);
LbrynetService.serviceInstance.setPendingContextIntent(pendingIntent);
}
checkNotificationOpenIntent(getIntent());
mReactRootView = new RNGestureHandlerEnabledRootView(this);