Sticky service killed and restart scheduled for 1000ms but never restarted
I have a running, sticky service that sometimes gets killed with a message:
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Force stopping com.example.myapp appid=10309 user=0: from pid 16033
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Killing 14900:com.example.myapp/u0a309 (adj 200): stop com.example.myapp
2018-11-19 06:54:42.210 1602-3282/? W/ActivityManager: Scheduling restart of crashed service com.example.myapp/.MyService in 1000ms
2018-11-19 06:54:42.217 1602-3282/? I/ActivityManager: Force stopping service ServiceRecord{ceedda0 u0 com.example.myapp/.MyService}
But after 1000ms nothing seems to happen.
Where do I start investigating?
From AndroidManifest.xml
:
<service
android:name=".MyService"
android:enabled="true">
</service>
android android-service
|
show 1 more comment
I have a running, sticky service that sometimes gets killed with a message:
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Force stopping com.example.myapp appid=10309 user=0: from pid 16033
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Killing 14900:com.example.myapp/u0a309 (adj 200): stop com.example.myapp
2018-11-19 06:54:42.210 1602-3282/? W/ActivityManager: Scheduling restart of crashed service com.example.myapp/.MyService in 1000ms
2018-11-19 06:54:42.217 1602-3282/? I/ActivityManager: Force stopping service ServiceRecord{ceedda0 u0 com.example.myapp/.MyService}
But after 1000ms nothing seems to happen.
Where do I start investigating?
From AndroidManifest.xml
:
<service
android:name=".MyService"
android:enabled="true">
</service>
android android-service
1
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
1
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
No, Android does.
– Jasper
Nov 19 '18 at 15:29
1
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32
|
show 1 more comment
I have a running, sticky service that sometimes gets killed with a message:
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Force stopping com.example.myapp appid=10309 user=0: from pid 16033
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Killing 14900:com.example.myapp/u0a309 (adj 200): stop com.example.myapp
2018-11-19 06:54:42.210 1602-3282/? W/ActivityManager: Scheduling restart of crashed service com.example.myapp/.MyService in 1000ms
2018-11-19 06:54:42.217 1602-3282/? I/ActivityManager: Force stopping service ServiceRecord{ceedda0 u0 com.example.myapp/.MyService}
But after 1000ms nothing seems to happen.
Where do I start investigating?
From AndroidManifest.xml
:
<service
android:name=".MyService"
android:enabled="true">
</service>
android android-service
I have a running, sticky service that sometimes gets killed with a message:
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Force stopping com.example.myapp appid=10309 user=0: from pid 16033
2018-11-19 06:54:42.208 1602-3282/? I/ActivityManager: Killing 14900:com.example.myapp/u0a309 (adj 200): stop com.example.myapp
2018-11-19 06:54:42.210 1602-3282/? W/ActivityManager: Scheduling restart of crashed service com.example.myapp/.MyService in 1000ms
2018-11-19 06:54:42.217 1602-3282/? I/ActivityManager: Force stopping service ServiceRecord{ceedda0 u0 com.example.myapp/.MyService}
But after 1000ms nothing seems to happen.
Where do I start investigating?
From AndroidManifest.xml
:
<service
android:name=".MyService"
android:enabled="true">
</service>
android android-service
android android-service
edited Nov 19 '18 at 16:35


Fantômas
32.3k156388
32.3k156388
asked Nov 19 '18 at 14:44
Jasper
1,4771429
1,4771429
1
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
1
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
No, Android does.
– Jasper
Nov 19 '18 at 15:29
1
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32
|
show 1 more comment
1
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
1
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
No, Android does.
– Jasper
Nov 19 '18 at 15:29
1
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32
1
1
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
1
1
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
No, Android does.
– Jasper
Nov 19 '18 at 15:29
No, Android does.
– Jasper
Nov 19 '18 at 15:29
1
1
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377026%2fsticky-service-killed-and-restart-scheduled-for-1000ms-but-never-restarted%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377026%2fsticky-service-killed-and-restart-scheduled-for-1000ms-but-never-restarted%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
why is it killed in the first place? It says "crashed service", you got some crash logs? Also what's the receiver about?
– Tim Castelijns
Nov 19 '18 at 15:07
@TimCastelijns added additional logs and removed receiver. There are no errors before the killing/force stopping.
– Jasper
Nov 19 '18 at 15:13
1
you are force stopping the app?
– Tim Castelijns
Nov 19 '18 at 15:27
No, Android does.
– Jasper
Nov 19 '18 at 15:29
1
force stopping is pretty extreme. It completely disables your app and all its components until the users starts it again manually. It is expected that the service is not restarted in this case
– Tim Castelijns
Nov 19 '18 at 15:32