Answer the question
In order to leave comments, you need to log in
Why doesn't the service process stop?
There is an "empty" application, the main activity with the buttons "Start" and "Stop" the service via startService/stopService. The service itself is also "empty", at start it returns START_NOT_STICKY. Runs in a separate process.
public class TestService extends Service {
@Override
public void onCreate() {
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return START_NOT_STICKY;
}
@Override
public void onDestroy() {
super.onDestroy();
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
}
<service
android:name=".TestService"
android:process=":service"
android:exported="false">
</service>
Answer the question
In order to leave comments, you need to log in
I can assume that this is an Empty process: https://developer.android.com/guide/components/pro...
+ the kernel gives the process a time quantum, like everyone else, I think.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question