Hi all,

I'm working on a messaging app that starts a service in the background that 
will receive messages from a Pebble smartwatch and then send out an sms 
message. Right at this moment, I'm trying to make it so that the service is 
always running in the background so that the user can always send texts 
even if the app isn't actually open. There is a private local variable in 
the service that contains the contacts that the user can send texts to. 
When I press the back button to exit the app after setting the contacts, 
the list persists and when I open the app again, I see the contacts. If I 
open up the all apps menu thing and swipe the app to exit it, the list is 
destroyed, however, I know the service is still running (I get Toasts from 
the service). I was under the impression that swiping the app closed and 
pressing the back button are the same. Are they not? Is there a way to make 
it so that the local variable is never destroyed as long as the service is 
running?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/12955365-d02b-4cfc-b948-a177b019acc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to