state - Android forcing full restart after an app is killed -


hello application works this.

startupactivity called first, lot of init stuff launches tvbtabactivity (tabactivity) has other activities tabs (e.g. browseactivity).

the problem seeing - when task-killer app used terminate app on tvbtabactivity/browse tab, , app relaunched again, system forgoes normal flow (startupactivity not spawned), instead restores last visible activity directly (tvbtabactivity).

how can force android run startupactivity first, initializes app?

obviously, dont have problem when app crashes on own, lol, due exception, , relaunched again.

<application android:icon="@drawable/appicon"   android:label="@string/app_name" android:name="com.xyz.qpapplication"   android:debuggable="true">    <activity android:name=".activity.startupactivity" android:configchanges="locale|orientation"    android:label="@string/app_name"     android:screenorientation="portrait">    <intent-filter>     <action android:name="android.intent.action.main" />     <category android:name="android.intent.category.launcher" />     <category android:name="android.intent.category.default" />    </intent-filter>   </activity>     <activity android:name=".catalogue.browseactivity" android:configchanges="locale|orientation"    android:label="@string/app_name" android:screenorientation="portrait"     android:launchmode="singletop">    <intent-filter>     <action android:name="com.xyz.android.intent.action.browse" />     <category android:name="android.intent.category.default" />    </intent-filter>    </activity>    <activity android:name=".activity.tvbtabactivity" android:configchanges="locale|orientation"    android:screenorientation="portrait" android:launchmode="singletask">   </activity> 

you can't. android try restore app left off. correct way handle ensure understand activity life-cycle , put appropriate initialization in appropriate place.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -