Print Page | Close Window

Android API 28

Printed From: TMS Software
Category: FMX Components
Forum Name: FMX WebGMaps / WebOSMaps
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=13137
Printed Date: 16 Sep 2019 at 3:24pm


Topic: Android API 28
Posted By: Lee Parvin
Subject: Android API 28
Date Posted: 13 Mar 2019 at 2:55pm
Hi there

Changing the Android API Target to 28, renders only a blank screen ie no map.

NOTE : Im targeting Android 9

Do you have any suggestions?

Thanks

Lee



Replies:
Posted By: Bart Holvoet
Date Posted: 13 Mar 2019 at 3:40pm
Hi,

Assuming you are using Delphi 10.3 Tokyo:

Have you tried running the application with Android API target set to the default value (26)?


Posted By: Lee Parvin
Date Posted: 13 Mar 2019 at 4:01pm
Hi Bart

Im running Delphi Rio, and yes it works fine with API 26. 

However, please see :-
http://docwiki.embarcadero.com/RADStudio/Rio/en/10.3_Rio_-_Release_1

Android TargetVersion in Manifest file

Because Im targeting Android Pie devices, I need to set the API  = 28.

Thanks

Lee



Posted By: Bart Holvoet
Date Posted: 13 Mar 2019 at 4:23pm
We'll have to further investigate this issue and will report back as soon as possible.


Posted By: Lee Parvin
Date Posted: 14 Mar 2019 at 4:34pm
Hi Bart

Im just checking if you have made any progress?

Also, using API 28 on Android 7 seems to fail sometimes


Thanks

Lee


Posted By: Bart Holvoet
Date Posted: 14 Mar 2019 at 4:47pm
Due to the heavy workload caused by other ongoing projects we haven't been able to further investigate this issue yet.
We'll continue investigating as soon as we have been able to allocate sufficient development time.

Can you please elaborate on what exactly is going wrong on Android 7?


Posted By: Akerman David
Date Posted: 23 May 2019 at 12:40pm
I'll add my experience to this ... Android 9 shows a white screen only (so no map, no controls, completely empty)  A beta user reported this and I then purchased a cheap Android 9 phone to test and I get the same.  I've not seen any issues on any other versions of Android (I've tried 5.1.1, 6.0, 7.1.2, 8.1).

The app is set to target API 28, but I get the same result with a simple test app using the map component and nothing else and without changing the target API.  I'm using Delphi 10.3.1.

I have TMS All Access so for now at least I'm going to replace the map with the OSM one, but a fix would be great.


Posted By: Bart Holvoet
Date Posted: 23 May 2019 at 3:35pm
Hi,

Can you try following the instructions to enable Android support as mentioned on this page?

https://www.tmssoftware.com/site/androidjs.asp - https://www.tmssoftware.com/site/androidjs.asp


Posted By: Akerman David
Date Posted: 31 May 2019 at 9:41pm
Yes, I'd already done that to my app.

I was wrong when I said that my app is targeting API 28; it's API 26 as default in Delphi 10.3.1.

Dave


Posted By: Bart Holvoet
Date Posted: 03 Jun 2019 at 3:30pm
We have not been able to reproduce an issue with TTMSFMXWebGMaps on Android 9.
Can you make sure the device has access to the Google Maps Servers and you are using a valid API Key?


Posted By: Akerman David
Date Posted: 07 Jun 2019 at 11:04am
I'll check again this weekend.  Sorry for the slow delay I didn't get a notification you'd replied.


Posted By: Akerman David
Date Posted: 08 Jun 2019 at 9:55pm
This might be a clue: I enabled ShowDebugConsole for the map, and that (on Android 9) gives me ""access to restricted url denied" in the script window.


Posted By: Bart Holvoet
Date Posted: 11 Jun 2019 at 9:16am
Does the error message state the url in question?
Do you have access to the Google Maps API URLs from your device?

http://maps.google.com/maps/api/js - http://maps.google.com/maps/api/js

http://maps.googleapis.com - http://maps.googleapis.com



Posted By: Akerman David
Date Posted: 11 Jun 2019 at 10:15am
I checked just now.  I've misled you ... it actually says "Access to restricted URI denied", not URL.  Sorry about that.  There's no other information provided.


Posted By: Bart Holvoet
Date Posted: 11 Jun 2019 at 2:22pm
Can you also check if the URLs mentioned above are accessible from your Android 9.0 device?


Posted By: Akerman David
Date Posted: 11 Jun 2019 at 2:41pm
Yes, both URLS open; first to a page of code second to Google Maps Platform page.


Posted By: Bart Holvoet
Date Posted: 11 Jun 2019 at 3:08pm
I'm not sure what is causing this issue as I haven't been able to reproduce this issue.
We also haven't received any similar reports from other users.

Would you be able to provide the following information by email ( mailto:help@tmssoftware.com - mailto:help@tmssoftware.com )?
- The API key you are using
- Screenshots of the settings in the Google Developers Console for the API Key are you using
- A screenshot of the app with the error message



Posted By: Akerman David
Date Posted: 11 Jun 2019 at 3:15pm
Sure, I'll sort those out later today.


Posted By: Lee Parvin
Date Posted: 31 Jul 2019 at 4:47pm
Hi there

Ive found further info, that may help (this relates to Android 9).

Checking the Android Logcat  I see the error :-

INFO:CONSOLE(25) "Uncaught ReferenceError: google is not defined", source: about:blank (25)

Please  have a look at :-

https://stackoverflow.com/questions/51520148/uncaught-referenceerror-google-is-not-defined-using-google-maps-api

I hope this helps.




Posted By: Bailey Andrew
Date Posted: 05 Aug 2019 at 9:11pm
I have had exactly the same issue - no maps on Android 9.0 - only blank white space
Fortunately I also saw that Exoplayer started to have the same issue which was that it was unable to connect and send a simple http request to its usual URL
I found the solution was to add the usesCleartextTraffic='true" to my manifest and now this has solved the problem
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted/52652182 - https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted/52652182


Posted By: Bart Holvoet
Date Posted: 06 Aug 2019 at 12:34pm
Hi,

This issue has now been resolved.
The update will be available with the next release of TMS FMX WebGMaps.


Posted By: Akerman David
Date Posted: 07 Aug 2019 at 1:19pm
Originally posted by Bailey Andrew

I have had exactly the same issue - no maps on Android 9.0 - only blank white space
Fortunately I also saw that Exoplayer started to have the same issue which was that it was unable to connect and send a simple http request to its usual URL
I found the solution was to add the usesCleartextTraffic='true" to my manifest and now this has solved the problem
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted/52652182 - https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted/52652182

Cheers, that fixes it for me :)

Dave



Print Page | Close Window