Android is killing activity while the service controlled by it lives on -


i have app has single activity has checkbox starts , stops foreground service. activity has other settings control service.

the problem after time navigating other apps service continues run fine activity gets killed. if restart activity checkbox set default, off. if switch on, second service starts, while first 1 still running , can't controlled anymore.

i can't figure out how handle situation. it's necessary service run indefinitely , there doesn't seem anyway keep activity dying. maybe there's way new activity find old service?

try kill service in onpause() method of activity .that solve problem few times ago.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -