Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I know this is duplicate question, but I am not getting the explanatory example or solution. I want to develop an application which after run calls a background service which takes the GPS location of device and send it via PHP web service to the server. And when user wants, he can stop the service.

I am working on service for the first time. I searched on google and found many tutorial, but not getting it.

So please guide me for this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
148 views
Welcome To Ask or Share your Answers For Others

1 Answer

you can able to send current location or lat and lag point into your server using webservice

frequently you want to update your location or lat and lag use handler

final Handler handler = new Handler();
handler.postDelayed( new Runnable() {

 @Override
 public void run() {
handler.postDelayed( this, 60 * 1000 );
 }
}, 60 * 1000 );

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...