I have a service that gets the location and sends it to a server, also I have an activity that starts and stops the service with a button. When I start up the service all the buttons do not work and after a while the activity force closes giving the option to wait or close. what could be causing the problem?
Share
I did something like that before … I dont post the whole code, jsut the main thing. This wont run, i just want to give you the idea, of what to llok for and how to handle it.
The magic is done in sendUpdatesToUI… I saved myself all the unimportant methods that are overwritten when you implement LocationListener – you know best, which of them you need.
class:
}
It probably won’t run that way, because I kicked out all the uninteresting stuff, but it should give you an idea, how to programm a locationthread, which won’t freeze your UI.
Have fun