BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-16-2010, 07:58 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: telus
Posts: 35
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up how to check and turn On GPS if off?

Please Login to Remove!

Hi all,
my application is reading the Latitude and longitude, it is working fine,
but it is giving exception when the option->Advance Option->GPS->GPS Services "Location off" otherwise when "Location On" then it is woking.

i tried to find the API to turn on, but i did not get, if any body know
how to check either GPS is on or off , and if off then how to On because
without turn on my application will give Exception
please help me.
Thanks and regards
Imran ali
Offline  
Old 02-16-2010, 10:08 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

There won't be an API for that. If the user turned off the GPS, why should an application be able to over ride that decision and turn it back on?
__________________
My other Blackberry is a PlayBook.
Offline  
Old 02-16-2010, 10:15 AM   #3 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

And adding to hrbuckley's post, your code should be expecting this situation and catching the exception.
Offline  
Old 02-16-2010, 11:05 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: telus
Posts: 35
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by hrbuckley View Post
If the user turned off the GPS, why should an application be able to over ride that decision and turn it back on?
Indeed, in my application when the mobile is switch on then at that time it should read the Longitude and latitude and mail it automatically.
i am able to send mail but when i am going to read the position when GPS is already off then it is creating problem.
so, i have to first check either GPS is on or off, if off then turn it on and read the Lon/Lati
therefor, if any one know the API to turn on the GPS then kindly help me.
Offline  
Old 02-17-2010, 11:44 AM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Third party developer applications can't do this. You will have to tell your users that if they want your program to function correctly location base services have to be turned on.
__________________
My other Blackberry is a PlayBook.
Offline  
Closed Thread


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-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.