Hello ! Does anyone know how to programmatically r...
# android
j
Hello ! Does anyone know how to programmatically restart app in single Activity architecture?
stackoverflow 3
g
Copy code
val intent = Intent(activity, SplashActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
activity.startActivity(intent)
👍 1
n
Also there is an library by Jake Wharton called Pheonix to restart the app. You can also copy that file into your project
@Jason ^^
j
Oh, thanks ! Can I use Pheonix Process lib for product app ver ? Any concerned @Nimish Nandwana
n
Not that I am aware of, do your research
590 Views