01-09-2009 01:01 AM - edited 01-09-2009 01:05 AM
I want to know whether disabled GPS in BB device.
Can user disable GPS for BB device ? Is it possible to know disabled GPS ?
Plz help me guys'
Solved! Go to Solution.
01-09-2009 05:46 AM
Check class javax.microedition.location.LocationProvider
and method: getState()
check the returned value with contstants defined in this class.
I think there is no programmatic way to turn the GPS off.
01-09-2009 07:45 AM
Tnx for your response.
I couldn't understand for you what I mean.
I tried to mean BB device has GPS chip.
is it possible to disable GPS by user ?
if so, how to know it ?
01-09-2009 07:51 AM
LocationProvider class can be used to obtain GPS state.
AFAIK there is no direct method to turn the GPS off.
As an option you can use class net.rim.device.api.gps.GPSSettings and method setPDEInfo and specify incorrect parameters deliberately to set the GPS off.
01-09-2009 08:47 AM
I think the Original Poster is asking a question about the User of the device, rather than doing anything pragmatically.
AFAIK, there is not a way that the user can switch GPS off, like say they can do for Bluetooth.
They may be able to control which applications are allowed to use the GPS receiver via the Application Policy.
Does this answer the question?
01-09-2009 08:53 AM
The forum section is "Java Development", so I supposed the question is about programmatic approach.
To turn the GPS off manually - just go to Options--Advanced Options--GPS and turn the GPS services to Location OFF.
01-09-2009 09:10 AM
A reasonable assumption - but he did ask "Can user disable GPS for BB device ? ".
Thanks for pointing out the Option. However I believe it is only available on devices running 4.5 and above.