Restart Home programmatically
I'm developing on Android. I have to restart home and all its components (widgets, shortcuts, etc..). For example, wh开发者_如何转开发en we have a Force Close, the home screen restart and reload all its components.
I have to restart home and all its components (widgets, shortcuts, etc..).
No, you don't.
For example, when we have a Force Close, the home screen restart and reload all its components.
If you have a "Force Close", you cannot execute code. Hence, what you want is impossible.
You should be able to relaunch it ACTION_MAIN and CATEGORY_HOME intent. If you've just killed the app then this should restart it.
精彩评论