-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] App with multiple processes. #1
Comments
What are the two processes? An activity and a service? Right now we can only kill the process in which the method was called and we can only restart activity processes. |
It should be possible to kill all app's processes via Also, what about scheduling relaunch of the process via |
Method overhead is too high. Cannot abide. |
I'm using the code below to kill other processes, does it look ok @JakeWharton ? Maybe we could optionally do it in the /**
* Wrapper around [ProcessPhoenix] to support multi-process kill
*/
object OSProcessPhoenix {
/**
* Kill others processes then call [ProcessPhoenix.triggerRebirth]
*
* @see ProcessPhoenix.triggerRebirth
*/
fun triggerRebirth(context: Context) {
val am = context.getSystemService(ACTIVITY_SERVICE) as ActivityManager
val processesInfo = am.runningAppProcesses
processesInfo?.forEach { process ->
if (process.pid != Process.myPid()) {
Process.killProcess(process.pid)
}
}
ProcessPhoenix.triggerRebirth(context)
}
} |
I have an application which components are running in two separated processes. Can ProcessPhoenix kill both of the processes at the same time?
The text was updated successfully, but these errors were encountered: