Then stop whatever you're doing in onPause() and continue doing what you're doing in onResume(). That's what they're there for.
------------------------------------------------------------------------------------------------- TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking On Wed, Dec 16, 2009 at 9:25 AM, steff <stefan.dierd...@googlemail.com>wrote: > My app is working fine and also works when onCreate() is (re)called. > But I'm sending accelerometer and orientation (as well as touch > position) data from the hardware sensors. And re-instantiating the app > causes a (small) lag in which no data is send. I'm using UDP via OSC > since transmission is time critical. > On the other hand, I don't want to keep on sending all sensor data > when the app is "no longer open" (a.k.a. in the background). This > would drain your battery really fast. That's why I'd like to end it. > > On 15 Dez., 20:45, Dianne Hackborn <hack...@android.com> wrote: > > On Tue, Dec 15, 2009 at 11:16 AM, steff <stefan.dierd...@googlemail.com > >wrote: > > > > > Having solved this, a new question arises: how can I securely exit the > > > app when it loses focus, i.e. the user returns to the homescreen? I > > > don't want no background process. > > > > You don't. That's not how Android works. > > > > And please be aware -- if you are using android:configChanges because > your > > app doesn't work when it rotates, then this is NOT a fix. You are just > > hiding the problem, which will show up in other cases such as when the > user > > leaves your app, its process needs to be killed, and they later return to > > it. > > > > Please don't just use android:configChanges to band-aid over problems in > > your app. Fix your app. > > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see > and > > answer them. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en