Firstly, I know that one should not really kill/restart an application on Android. In my use case, I want to factory-reset my application in a specific case where a server s
With the Process Phoenix library. The Activity you want to relaunch is named "A".
Java flavor
// Java public void restart(){ ProcessPhoenix.triggerRebirth(context); }
Kotlin flavor
// kotlin fun restart() { ProcessPhoenix.triggerRebirth(context) }