BlackBerryForums.com : Your Number One BlackBerry Community  
   

»Sponsored Links



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
praveens Offline
Knows Where the Search Button Is
 
Posts: 36
Join Date: Apr 2008
Location: india
Model: 8700
PIN: 12345
Carrier: Airtel
Thumbs down How to stop the gps data .... - 07-18-2008, 04:33 AM

Hi,

i get the gps interval at every 1 here is the code

_locationProvider.setLocationListener(xll, 60, 1, 1);


for some time i have to stop the GPS data....... how to stop the gps data ..through the code..


Thanks,
praveen..
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
hrbuckley Offline
Thumbs Must Hurt
 
Posts: 154
Join Date: Jan 2006
Model: 8820
Carrier: Rogers
Default 07-18-2008, 06:44 AM

_locationProvider.setLocationListener(null,-1,-1,-1);
   
Reply With Quote
  (#3 (permalink)) Old
praveens Offline
Knows Where the Search Button Is
 
Posts: 36
Join Date: Apr 2008
Location: india
Model: 8700
PIN: 12345
Carrier: Airtel
Default 07-18-2008, 07:12 AM

how i am stopping the previous interval...
   
Reply With Quote
  (#4 (permalink)) Old
hrbuckley Offline
Thumbs Must Hurt
 
Posts: 154
Join Date: Jan 2006
Model: 8820
Carrier: Rogers
Default 07-18-2008, 09:37 PM

Well it is a bit complex. There can be multiple listeners to the GPS, each with its own interval etc. For example a user could run Google Maps and Blackberry Maps at the same time. Each would establish a LocationListener. When a listener no longer wants to receive location data there are two options:

Code:
_locationProvider.setLocationListener(null,-1,-1,-1); //registration of any previously set listener is cancelled
_locationProvider.setLocationListener(_listener, 0, -1, -1); //the application wants to receive only provider status updates and not location updates at all.
This is of course all documented in the API documentation.
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1