On Fri, Mar 18, 2011 at 10:59 AM, Robert <[email protected]> wrote:
> The only problem with that is I need to keep a constant connection
> throughout the application. The idea is that the user can connect to the
> different devices and switch between controlling them (which will be
> featured as different activities). Ultimately I could keep it as a single
> page (single activity) application, but I wanted the app to act similar to
> the Android Settings, which uses the PreferenceActivity, and be able to use
> of the its inherit functions. Otherwise I'd have to re-create my own views.

I am somewhat confused by your UI design -- PreferenceActivity should
be used for preferences, not general application functionality.
Moreover, PreferenceActivity is a single activity, which would fit
well with the onPause() suggestion I gave earlier.

There is no "exit the application" concept in Android, any more than
there is an "exit the application" concept in a Web app. If you want
to do something based upon "exit the application", that is your
prerogative, but you will have to do the bookkeeping yourself to
determine when it is appropriate to drop your connection.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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

Reply via email to