应用程序的应用程序已创建但主要活动未创建

时间:2014-01-13 06:40:44

标签: android android-activity launcher

我的应用是启动器。

在启动器上启动应用。 当我的启动器处于后台时,从logcat我可以看到Application已创建,但未创建主活动。

public class LauncherApplication extends Application {
    @Override
    public void onCreate() 
    {
        super.onCreate();
        ......
        Log.d("TAG", "onCreated");
    }
}

public class MyLauncher extends Activity {
    .....
}

的Manifest.xml

 <application
    android:name="com.launcher.LauncherApplication"
    android:label="@string/application_name"
    android:hardwareAccelerated="true"
android:process="android.process.acore" 
android:largeHeap="true"
    android:persistent="true" >

    <activity
        android:name="com.launcher.MyLauncher"
          android:configChanges="mcc|mnc|keyboardHidden|keyboard|orientation|screenLayout|screenSize|smallestScreenSize|navigation|uiMode"
        android:launchMode="singleTask"
        android:clearTaskOnLaunch="true"
        android:stateNotNeeded="true"
        android:screenOrientation="portrait"
        android:persistent="true" 
        android:allowBackup="true" 
        android:windowSoftInputMode="stateUnspecified|adjustPan" >

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.HOME"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.MONKEY" />
        </intent-filter>
    </activity>
 ......
 </Application>

MyLauncher是主要活动。

我的问题是: 当日志打印“onCreated”时,这意味着我的启动器在后台被杀死了操作系统并重启了LauncherApplication?

0 个答案:

没有答案
相关问题