it needs the "android:" namespace android:clearTaskOnLaunch="true"
On Jan 17, 8:24 am, Sergio Luceno <[email protected]> wrote: > true, sorry i was using clearTaskOnLaunch. > > I tried to set this to true in the main activity... ando also in all > activities. > > But it still not working. > > here is how i define my main activity. > > <activity android:name=".Init" > android:label="@string/app_name" > clearTaskOnLaunch="true" > android:theme="@android:style/Theme.NoTitleBar"> > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > <category > android:name="android.intent.category.LAUNCHER" /> > </intent-filter> > </activity> > > On 17 ene, 16:49, Kostya Vasilyev <[email protected]> wrote: > > > It only needs to be set on your "main" activity, the one you want the user > > to come back to. > > > And it's not "finishTaskOnLaunch", it's "clearTaskOnLaunch". > > > -- Kostya > > > 2011/1/17 Sergio Luceno <[email protected]> > > > > Hi! > > > > I tried to set up the setting finishOnTaskLaunch to true at all my > > > activities... but when I click home and then open my app again, it > > > didn't start at the main activity, it start at the same activity that > > > was running when i clicked the home button... > > > > On 17 ene, 12:23, Kostya Vasilyev <[email protected]> wrote: > > > > Sergio, > > > > > To stop the background task - stop the background task. > > > > > It's your own code, so it's under your control. The framework tells you > > > when > > > > things happen via activity state callbacks (onPause / onResume), you > > > > just > > > > need to do the right thing with them. > > > > > For your second issue: > > > > >http://developer.android.com/guide/topics/manifest/activity-element.html > > > > > set clearTaskOnLaunch to true. > > > > > -- Kostya > > > > > 2011/1/17 Sergio Luceno <[email protected]> > > > > > > I wanna do that, because I have a task running on background. And i > > > > > wanna stop it when the application is closed. This task is doing http > > > > > calls every X minutes to sync the application data over internet. > > > > > > Also, android OS keep the state of the application and open it at the > > > > > last activity where the user was on. > > > > > > I would like to open the application always by the main activity. also > > > > > this main activity is doing a login call, which receive the session id > > > > > to make more http calls. I have a risk to loose the session id, while > > > > > the user is not using the app and it stills in memory for a long time. > > > > > > On 17 ene, 11:55, Kumar Bibek <[email protected]> wrote: > > > > > > Why would you try to do that? The OS would get rid of it whenever it > > > > > feels > > > > > > necessary. ie, whenever, the device runs low on memory. > > > > > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com > > > > > > > On Mon, Jan 17, 2011 at 4:22 PM, Sergio Luceno <[email protected]> > > > > > wrote: > > > > > > > Hi all, > > > > > > > > Is there a way to force the application not keep running after > > > close > > > > > > > it? > > > > > > > > When the user closes de applications, it always is running memory. > > > > > > > > Is it possible to define some at the manifest to force the app to > > > be > > > > > > > removed from the memory? > > > > > > > > I was trying to find out some parameter at the manifest... but I > > > > > > > didn't find nothing > > > > > > > > Thanks in advance > > > > > > > > -- > > > > > > > You received this message because you are subscribed to the Google > > > > > > > Groups "Android Developers" group. > > > > > > > To post to this group, send email to > > > > > [email protected] > > > > > > > To unsubscribe from this group, send email to > > > > > > > [email protected]<android-developers%2Bunsubs > > > > > > > [email protected]><android-developers%2Bunsubs > > > [email protected]><android-developers%2Bunsubs > > > > > [email protected]> > > > > > > > For more options, visit this group at > > > > > > >http://groups.google.com/group/android-developers?hl=en > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Android Developers" group. > > > > > To post to this group, send email to > > > [email protected] > > > > > To unsubscribe from this group, send email to > > > > > [email protected]<android-developers%2Bunsubs > > > > > [email protected]><android-developers%2Bunsubs > > > [email protected]> > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<android-developers%2Bunsubs > > > [email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

