Tuesday, 24 December 2019

Is it possible to restart Android App after calling ActivityManager.clearApplicationUserData()

My current Android Application needs to call

 ActivityManager.clearApplicationUserData()

to simulate the user clearing App storage

Which works fine.

A side effect of calling clearApplicationUserData() is that the App is (understandably) closed.

Which gives a poor user experience.

I am having difficulty in restarting my Application once I have called clearApplicationUserData().

I have tried using startActivity, Alarm Manager with Pending Intent, Foreground/Background service.

Nothing works.

Is it impossible to restart an Android App having called clearApplicationUserData()?



from Is it possible to restart Android App after calling ActivityManager.clearApplicationUserData()

No comments:

Post a Comment