diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java index 473f13c5..0b577dc6 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java @@ -7,6 +7,7 @@ import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.IBinder; +import android.os.Looper; import android.support.v4.app.NotificationCompat; import android.util.Log; @@ -292,6 +293,7 @@ public class SyncthingService extends Service { new Thread(new Runnable() { @Override public void run() { + Looper.prepare(); if (isFirstStart(SyncthingService.this)) { Log.i(TAG, "App started for the first time. " + "Copying default config, keys will be generated automatically");