1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Make sure service also runs in background after first app start.

Previously, it would be stopped when exiting the activity due to no
call to `startService()`.
This commit is contained in:
Felix Ableitner 2014-08-24 17:12:51 +02:00
parent 35d80844fc
commit a1ddfbb2db

View file

@ -33,6 +33,7 @@ public class SyncthingActivity extends ActionBarActivity implements ServiceConne
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startService(new Intent(this, SyncthingService.class));
bindService(new Intent(this, SyncthingService.class),
this, Context.BIND_AUTO_CREATE);
}