3

I want to build a Geolocation App with Intel-XDK (HTML5-Cordova). The Intel-XDK provides a Google Maps Widget which can be used to display a map.

The widget works properly in the Intel-XDK emulator or in the "Intel App Preview" on my Device (Android 4.4). If i build the App and install the .apk on my device the map doesn't display. I figured out that the "window.google" object is undefined. In the Intel App Preview and the Emulator of Intel-XDK the object is defined.

Whats wrong with the build?

You can reproduce this by creating a new Intel-XDK Cordova Project and place the Google Map Widget on your home screen.

Update

Solution: Adding a "*" in the Domain list under Project Settings -> Build Settings -> Android -> Domain list.

Explanation: Cordova use a "Domain whitelisting security model" which controls applications access to external domains. More info: Whitelist Guide

Thanks to krisrak for the hint!

infler
  • 41
  • 4
  • Have you take look at this official video [here](https://software.intel.com/en-us/videos/service-results-as-markers-on-a-google-map)? Also, you can try to search `window.google` in official doc – bjiang Apr 14 '15 at 16:19
  • Yes i saw the video, but the video show the app only in the emulator. I searched the offical docs for "google", "window.google", "maps widget", etc, but i still cant find a solution. – infler Apr 14 '15 at 16:47
  • try adding a "*" in the project settings -> build settings ->android -> domain list – krisrak Apr 14 '15 at 18:46
  • Great, now the map works properly! Updated the question. Thanks for the hint! – infler Apr 14 '15 at 19:37

0 Answers0