mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 10:16:01 +00:00
Improve push notification service initialization (#21553)
This commit is contained in:
parent
cf72bcbe42
commit
e43a328c6f
@ -870,7 +870,11 @@ public class PushNotificationHelper {
|
||||
public void start() {
|
||||
Log.e(LOG_TAG, "Starting Foreground Service");
|
||||
Intent serviceIntent = new Intent(context, ForegroundService.class);
|
||||
context.startService(serviceIntent);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
context.startForegroundService(serviceIntent);
|
||||
} else {
|
||||
context.startService(serviceIntent);
|
||||
}
|
||||
this.registerBroadcastReceiver();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user