I am new to android dev. Our requirement is to run a background service in android. Which is unkillable or it is capable to handle KILL signal from taskmanager..
Is there is any way to do it?
I have heard about addShutdownHandler, But it wont fired when user kills it.
Thanks in advance
From
man 7 signal:This is fundamentally by kernel design. Think about it: if a process could ignore all signals whatsoever, then how would you stop it if it ran away uncontrolled? No, what you’ll have to do is see to it that the KILL signal is not sent. Running your program under its own userid should achieve this, as long as no one with administrative privileges generates the signal — but even this requirement may be practically impossible to meet. By design, the system provides the basic ability to kill a process, on the theory that the user or sysadmin might (for whatever reason) want the process killed.