The NativeDisplayObjects sample app does not work on Android

Yes, Android 4.3 would be too old for Google Maps to work in a webView.

Ok, thanks!

After testing with a brand new device, it still does not work on Android (although workging perfectly on iOS). Google support wrote this:

It looks like you are having issues adding the API key to the JavaScript Map request, so it does not authenticate under your project. If you are not able to add an API key in your Map request, or you have an invalid character in your request (like a space or when URL encoded, it could be a plus sign (+), or any special character), or you accidentally added an extra character or deleted a portion of the key, you will have an error for invalid key. The error will result to a grey map with “Oops! ----” message.

To fix this, we would need to get the exact request that your application generated. Is there a way for you to log the full URL request that your application is sending?

I sent the key to Google support and they have confirmed that it is correct and I have re-checked in config.lua, which is also correct. This is what it looks like

license = { google = { key = "[my google iap key]", mapsKey = "[my google maps key]", } }

“key” is for Google IAP and “mapsKey” is for showing maps (as per the new requirement from Google). Google specifies the word “key” to add the maps key when making a request to the Google Maps API:

 \<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR\_API\_KEY&callback=initMap" type="text/javascript"\>\</script\>

Could it be that you are using the “key” string and not the “mapsKey” string when making the call?

This looks more and more like something on Corona’s end. My key is valid and it is entered correctly at the correct place according to the docs. Does the Corona NativeDisplayObjects sample app work for you? If adding the Google IAP key too?

I’m moving this discussion to a new thread in the Android forum since it is no longer just a matter of the sample app but of the native map object on Android in general. 

Samsung Galaxy S4