4

Does anyone know how to programmatically turn off the Blackberry internal GPS receiver?

Maksym Gontar
  • 22,765
  • 10
  • 78
  • 114
Dave
  • 267
  • 2
  • 4
  • 12
  • 2
    If you want to do this from a BB application I think you can't do it. The BB will turn of the GPS once no running application requests coordinates any more. You can only stop requesting coordinates yourself and hope that nothing else requests any. – Joachim Sauer Sep 16 '09 at 09:36

1 Answers1

1

The best you can do is inform the system that your program is no longer interested in positions via the LocationListener interface:

locationProvider.setLocationListener(null, -1, -1, -1);

Access to the GPS is managed through JSR 179 which satisfies all location data requests and manages the GPS hardware to provide service.

Richard
  • 8,920
  • 2
  • 18
  • 24
  • 1
    Thanks. Do you know how to turn it back on? – Dave Sep 15 '09 at 16:42
  • Is there no actual way to turn GPS off however? I am really looking to do this to save battery power so the above solution wouldnt help in this case. Thanks. – Dave Sep 15 '09 at 16:45
  • To turn in back on request a location either through a single location request (which will allow it to go off again): locationProvider.getLocation(timeout) or by setting a listener: locationProvieder.setLocationListener(listener, interval, timeout, maxAge) At the application level you can only limit your own program's power consumption. If the user wants to disable the GPS so that no programs can turn it on that can be done through the GPS options page. – Richard Sep 16 '09 at 10:51