Need help, GeolocationEvent.UPDATE does not fire?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vikram Raman
    New Member
    • Feb 2010
    • 24

    Need help, GeolocationEvent.UPDATE does not fire?

    Hi,

    I am developing a small app in felx mobile project for blackberry playbook, am using flash builder burrito,
    i want to get the current location's latitude ,longtitude value using GPS. But the geolocation event does not fire in my code, anyother way to get the latitude,longti tude value?

    Code:
    protected function button1_clickHandler(event:MouseEvent):void
    			{
    				// TODO Auto-generated method stub
    				
    				if(Geolocation.isSupported)
    				{
    					    txt_GPS.text = "GPS Supported";			
    					    geocode.setRequestedUpdateInterval(100);
    				    	geocode.addEventListener(GeolocationEvent.UPDATE,handleLocationRequest);
    
    				}				
    				else
    				{
    					txt_GPS.text = "Not Supported";
    				}
    				
    			}
    			 
    			public function handleLocationRequest(event:GeolocationEvent):void
    			{
    				txt_GPS.text = event.latitude.toString();
    			}
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Based on my experiences with Android, I would guess you need to tell the OS that it should send that GeolocationEven t.UPDATE message to you. I imagine Blackberry has something similar.

    For example in Android the project has a manifest that says "I need to be able to see X message", and then you could trap for those events in the application

    Comment

    • Vikram Raman
      New Member
      • Feb 2010
      • 24

      #3
      Hi plater thank you very much. The event does not fire in simulator but it fires on the playbook device, i m not sure, i dont have device right now. Anyway let me working with ur idea.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Ahh it is possible that the emulator does not support that kind of thing. I mean what would you have it do, generate random gps coordinates?

        Comment

        • Vikram Raman
          New Member
          • Feb 2010
          • 24

          #5
          Yes plater, I want to generate random gps coordinates.

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Then I think you would need to get with the people who made the emulator and request support for configuring what coordinates the GPS hardware will do.

            Comment

            Working...