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

Reply
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

As in previous posts says, On Simulator select Simulate and GPS Location option.

Use Search. "Accept Solution" If the problem is resolved.
Highlighted
Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: How to get Current GPS Location from the BlackBerry emulator?

[ Edited ]

@ Ashik

 

You need to implement LocationListener and want to put your code inside 

"public void locationUpdated(LocationProvider provider, Location location)" method.

 

Edit: Just for the confirmation. If you already did this, then cheers Smiley Happy 

Message Edited by baskaraninfo on 25-05-2009 04:26 AM

Use Search. "Accept Solution" if the problem gets resolved.
New Developer
Posts: 75
Registered: ‎04-07-2009
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

Yes,  I got the GPS coordinates which are same as the Selected GPS location's latitude and longitude. How we can get the our current GPS position that is (Longitude, and Latitude). Isn't the simulator doesn't find the GPS posistion automatically without any selection of Location. I used 9000 JDE (BlackBerry bold) simulator. 

Pls, suggest me----

Thanks in advance.

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

It is only for simulation, Actual device can get you the Lat and Long.

Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 75
Registered: ‎04-07-2009
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

Thank u
New Developer
Posts: 4
Registered: ‎07-08-2009
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

Hi I am trying to test my location based web up for Blackberry. I am working with the Blackbery Storm Emulator,:

 

    <script "text/javascript">
           
          function locationCB()
      {
          alert("Latitude "  +
              blackberry.location.latitude + " Longitude " + blackberry.location.longitude);
         return true;
      }
            if( window.blackberry && blackberry.location.GPSSupported)
                {document.write("GPS Supported");
                 blackberry.location.onLocationUpdate("locationCB()");
          
           // set to Autonomous mode
          blackberry.location.setAidMode(2);
          
          //refresh the location
         blackberry.location.refreshLocation();
         }
            else document.write("This Device doesn't support the Blackberry Location API");
           
            </script>

And I get a Alert with my location Altitude and Latitudde = 0 all the time . I tryed to change the default locationof GPS from Simulate->GPSLocation, My App still returns 0,0 and i tryed to create routs and start running it,  Still get 0, 0 for my coordinats, Can someone point out for me what am I missing?Thanks

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to get Current GPS Location from the BlackBerry emulator?

I had got the similar problem when trying the lat and long values using BB javascript, I can recall is that I restarted GPS Simulation tool and the Simulator and started getting result.. I dn't know what exactly was the reason.

Use Search. "Accept Solution" If the problem is resolved.