Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is this propel way shutdown app

 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this propel way shutdown app... it seems not, go back one step and after return button pressed on keyboard, and press again for repeated 3 = 5 total times, this shutdown app...

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is. Not sure what the mention of going back and hitting return repeatedly is all about; it certainly doesn't shut down any apps.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If press to run this line does not shut downs immediately but needed press/run line, for 3-4 times...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finish quits the current activity, not the application. If an application has opened several activities, then you need to call finish on all of them.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how shutdown an app independently how many activities ran previously?
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't done any Android development yet, but won't the app close when all activities are closed? IF so, all you need to do to close the app immediately is finish all activities, not just the current one. If the existing activities are not retrievable using the API then just store them all yourself.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how the application is structured. An Android app can contain components other than activities (like services, wallpapers, content providers, broadcast receivers). Some of those might still be running even if all activities have been terminated. If the app consists only of activities, then terminating those will leave no part of the app running.

You could use a custom Application subclass to keep track of all open activities: http://trace.adityalesmana.com/2010/08/declare-global-variable-in-android-via-android-app-application/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic