Skip navigation
Currently Being Moderated

Android - StageWebView with Geolocation

Aug 2, 2012 9:10 AM

I'm creating a cross-platform app using Flash CS6 targeted at AIR 3.3.0.3650. I setup a StageWebView and load a URL which uses geolocation via Google's JS API.

 

I've ported my code from a working IOS implementation into Android. The code worked 100% fine on IOS, however, I do not get any prompts for permission to use a current location on the Android platform, and thus the map does not load or show your geolocation.

 

I've kept the appplication and code to a complete minimum, but I'm still banging my head against the wall to get a prompt or get the geolocation working. If you were to visit the URL below via a desktop browser or the Android's default browser, the geolocation works. When you load it via StageWebView, the map portion remains blank.

 

I have also set all permissions to allow for location services, etc. to no avail. Here is the barebones code that I'm running with to troubleshoot. I've even went as far as to use someone else's website in the StageWebView instance to make sure it wasn't an error within the loaded page.

 

var webView:StageWebView;

webView = new StageWebView();

webView.stage = stage;

webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);

webView.loadURL("http://merged.ca/iphone/html5-geolocation/");

 
Replies
  • Currently Being Moderated
    Feb 24, 2013 4:44 PM   in reply to jdkuzma

    I'm having this issue as well. Has anyone discovered a work-around yet?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2013 10:33 AM   in reply to jdkuzma

    J, did YOU ever figure it out?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points