开发者

android: After closing my app, in Application Management, still showing Force Close

I can start my app and close later. But after closing, if I go to Settings-->Applications-->Manage Applicaitons and select my app, the Force Close button is still active which means my app is running behind the scenes. Why is th开发者_如何学JAVAis...???


When you close your application, the process of it is still active and will be active while/if system will not kill it in the future. So in Settings-->Applications-->Manage Applicaitons you can by force kill process of your application. This is feature of Android OS.


Use this to close your application. It still show you Force Close button but it's closes all your activity.

Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.addCategory( Intent.CATEGORY_HOME );
homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homeIntent);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜