Taha Sami
Taha Sami

Reputation: 1697

Keep service running when the app is killed

How can I keep the service running when the app is killed?

App 1: When I pressing on the recent apps key on the phone and close the app, Then the app stops the service and starts it again.

App 2: When I pressing on the recent apps key on the phone and close the app, Then the app not stops the service and continues working.

How can I make my service like App 2?

Manifest

<service android:name=".WindowManagerService" />

WindowManagerService

onStartCommand is empty but it return START_STICKY

Upvotes: 0

Views: 174

Answers (1)

MoD
MoD

Reputation: 634

I think you are looking for: background processing

or for older versions: background service

Upvotes: 1

Related Questions