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

Web and WebWorks Development

Reply
New Developer
dpicky
Posts: 57
Registered: ‎08-08-2008
My Device: Not Specified

blackberry.location on 8520

If I load the following page on a Curve 8520, it reports that the GPS Enabled, even though it doesn't have one!!

 

Does anyone know of a more reliable way of detecting the presence of a GPS receiver and if it's enabled via the browser? 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT type="text/javascript">
<!--
if(blackberry.location.GPSSupported)
document.write('GPS Supported');
else
document.write('GPS Not Supported');
//-->
</SCRIPT>
</BODY>
</HTML>

 

<HTML>

<HEAD>

</HEAD>

<BODY>

<SCRIPT type="text/javascript">

<!--

if(blackberry.location.GPSSupported)

document.write('GPS Supported');

else

document.write('GPS Not Supported');

//-->

</SCRIPT>

</BODY>

</HTML>

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: blackberry.location on 8520

Hi dpicky,

 

What version of the BlackBerry OS is the 8520 running.  If it is 5.0 you may have another option with Gears.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
dpicky
Posts: 57
Registered: ‎08-08-2008
My Device: Not Specified

Re: blackberry.location on 8520

Hi Tim

 

Cheers for the response.  The unit has 4.6.1.305 on it.  Aware of the Gears location feature of 5.0 but got some MDS Runtime apps so can't go 5 just yet :smileysad:

 

Dave

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: blackberry.location on 8520

Hi Dave,

 

I downloaded the 8520 Simulator with OS 4.6.1.305 and I tried your JavaScript.  When I ran it, the text displayed was "GPS Not Supported".  So it appeared to be working.

 

At first it didn't work for me until I realized I didn't have JavaScript turned on in the browser

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.