I have a service that is running in the same process.
<service
android:name=".service.GlassService"
android:exported="true"
android:label="@string/app_name" />
I start the service using startService().
startService(new Intent(this, GlassService.class));
When I swipe down and exit the application, service lives on. When I kill it from DDMS, service is restarted, calling service with START_STICKY
nor START_NOT_STICKY
don't make a difference.
The only way I can stop service is when I explicitly call stopService() or stopItself() or omitting startService().
This is not the case on other android devices. Is this behavior typical for Google Glass ?
That is typically why people use services. They are long running processes that are usually used to do background processing or for syncing data from a content provider. So it's easily an extension, that they can outlive their parent process.
Source:
Says so in this Google documentation[docs][1] (Read the part about why services aren't a thread)
[1]: http://developer.android.com/reference/android/app/Service.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With