mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Start foreground on create
Sometimes there is a significant delay between on create and on start command
This commit is contained in:
@@ -36,11 +36,15 @@ public class ServiceExternal extends Service {
|
||||
// adb shell am startservice -a eu.faircode.email.DISABLE
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
startForeground(Helper.NOTIFICATION_EXTERNAL, getNotification().build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
try {
|
||||
startForeground(Helper.NOTIFICATION_EXTERNAL, getNotification().build());
|
||||
|
||||
Log.i("Received intent=" + intent);
|
||||
Log.logExtras(intent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user