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 <[email protected]> wrote: > On Tue, Dec 15, 2009 at 11:16 AM, steff <[email protected]>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 > [email protected] > > 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 [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

