Hi guys, i'm new to the Android development (and i don't speak english very well, so excuse me for any mistake i'm going to put in this text), so the answer may be very simple (and the question stupid).. i read the android documentation but i keep on with my doubts..
I have a service that use the location manager to know the location of the device. I have others activities, let's say the A (main) activity, and the B (secundary) activity. The idea is to start the service in A and keep using it in B.. i mean, i want to initialize the localization service in A, decide wher start/stop listening for location in A, and keep doing the same in B.. Also, I need to access some other method of the service. My first attempt was to create a binded service.. in A it works well, i bind to it in A.onStart(), later in the code (button click, for example) i call something like A.startListeningForLocation()... and I unbind from the service in A.onPause(). Now, if i do the same with the B activity, i found the service to pass through the onDestroy() method.. i'd like, in B, to bind to the service, and call other method, without having to initalizate the location manager again.. so i suppose the i have to start the activity normally and then bind to it.. So, my questions is: is this a correct solution? where should i have to start / bind / unbind /stop the service, in A and B (supposing y only have the two activity)? Thank you very much guys, Dani -- 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

