android - Stopforeground behavior and notifications -
i've got intentservice
, in onhandleintent()
phone call startforeground()
@ origin , stopforeground
@ end of method. when phone call stopforeground(false)
notification removed if specified kept around. documentation says:
“if stop service while it’s still running in foreground, notification removed.”
so seems when intentservice
calls stopself()
reason service 1 time again in foreground state. way right behaviour create new notification after stopforeground(true)
. missing something?
an intentservice
stops when work done in onhandleintent
. if intentservice
has stopped, why want go on showing notification? sounds should using regular service
, command phone call stopself
.
it makes perfect sense notification would automatically removed phone call stopself
, whether or not phone call stopforeground
. service done.
android android-service
No comments:
Post a Comment