I checked a lot of information online and found that many methods could not exit.
The following information
Http://www.android123.com.cn/androidkaifa/519.html
Http://www.2cto.com/kf/201111/111395.html
Http://android.tgbus.com/Android/tutorial/201103/347436.shtml
Can not exit normally, I wrote the following program, my program under sdk2.2 through
Write in baseaciti.pdf. Java
Public static list <activity> activitylist = new arraylist <activity> ();
@ Override
Protected void oncreate (bundle savedinstancestate ){
// Todo auto-generated method stub
Super. oncreate (savedinstancestate );
Activitylist. Add (this );
}
On the exit page, write:
On the homepage, finish all the activities and exit,
Public Class AA extends baseaciti.pdf {
If (strtitle. Revoke signorecase ("quit "))
{
Log. D ("activity count:", activitylist. Size () + "");
For (INT I = 0; I <activitylist. Size (); I ++)
{
If (null! = Activitylist. Get (I ))
{
Activitylist. Get (I). Finish ();
}
}
System. Exit (0 );
}
}