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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 6
Registered: ‎11-16-2012
My Device: 9700
My Carrier: AT&T

Turn on GPS programmatically in blackberry 5.0

can any one please help me in turning on the location services programmatically in 5.0 .

 

my requirement is like its a background service which will track the lat long positions .

even if the user turns of the location services in the gps settings i should be able to turn it ON programmatically

 

Trusted Contributor
Posts: 151
Registered: ‎07-20-2010
My Device: Not Specified

Re: Turn on GPS programmatically in blackberry 5.0

Hi, try LocationInfo.isLocationOn(). Don't know if the method is available for OS5. It works for me on OS6 and 7x

Thanks

 

David

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Turn on GPS programmatically in blackberry 5.0

AFAIK, it is not possible to programatically enable the location settings.  You just have to tell the user that they need to enable them. 

Trusted Contributor
Posts: 151
Registered: ‎07-20-2010
My Device: Not Specified

Re: Turn on GPS programmatically in blackberry 5.0

sorry for the incomplete post, its actually LocationInfo.setLocationOn()

 

Thanks

 

David

New Contributor
Posts: 6
Registered: ‎11-16-2012
My Device: 9700
My Carrier: AT&T

Re: Turn on GPS programmatically in blackberry 5.0

Hi David thanks for the reply LocationInfo.isLocationOn() is not available in on OS5.

please let me know if there is alternate method.

New Contributor
Posts: 6
Registered: ‎11-16-2012
My Device: 9700
My Carrier: AT&T

Re: Turn on GPS programmatically in blackberry 5.0

Sorry  LocationInfo is not available in OS5.0.

 

Thanks 

Priyank.

Highlighted
Developer
Posts: 31
Registered: ‎08-05-2011
My Device: 9550
My Carrier: Vodafone

Re: Turn on GPS programmatically in blackberry 5.0

As 


/*********************************************************************/
Please press the like button on the right side to thank me if my reply helped you and please mark posts as solved if you found a solution.
Developer
Posts: 31
Registered: ‎08-05-2011
My Device: 9550
My Carrier: Vodafone

Re: Turn on GPS programmatically in blackberry 5.0

You can well try to direct the user to to Manually turn the GPS on if the GPS is switched off. Like is done in case of say Android or Iphone applications. i.e. try to redirect the user to the turn the GPS ON.


/*********************************************************************/
Please press the like button on the right side to thank me if my reply helped you and please mark posts as solved if you found a solution.