I'm calling recreate in onActivityResult of MainActivity when certain changes are made in the app settings. After recreation, onResume is not called.
I'm also getting the error:
E/ActivityThread: Performing pause of activity that is not resumed
From this question, I understood that this function can't be called from onResume. But I'm calling them from onActivityResult. Also using handler to call recreate resolves the problem, but causes a blink that looks bad to the user. What could be the possibly wrong here? How can I use recreate without a Handler?
Any ideas will be appreciated. Thanks!
I finally solved the problem by sending a broadcast from the
SettingsActivityto theBroadcastRecieverin theMainActivityand callingrecreate()insideonRecieve().