Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Posts: 126
Registered: ‎10-15-2010
My Device: Torch 9850
My Carrier: Not specified

update gps to webservice

In my app i want to do a task, when any user clicks the submit button, app wants to the current GPS Co-Ordinates for the handset and then call the web service URL every 60 Seconds. Is it possible to get the gps and call web service concurrently for every 60 seconds. Please suggest.

Contributor
Posts: 38
Registered: ‎03-13-2012
My Device: 9860
My Carrier: 1234

Re: update gps to webservice

[ Edited ]

Yes. 

 

If you have eclipse environment, Import the GPSDemo.

 

If you read through the code, it obtains the GPS and posts it to screen.

 

All you would have to do is instead, send it to your webservice.

 

One of the lines that creates the gps listener is: 

_locationProvider.setLocationListener(new LocationListenerImpl(), _interval, -1, -1);

 

Where _interval is your desired interval aka 60 in your case.

Trusted Contributor
Posts: 126
Registered: ‎10-15-2010
My Device: Torch 9850
My Carrier: Not specified

Re: update gps to webservice

Thanks doomsknight, I will implement it in my app.

Contributor
Posts: 38
Registered: ‎03-13-2012
My Device: 9860
My Carrier: 1234

Re: update gps to webservice

Feel free to mark it as correct answer / Like it. Would be my first