Google Maps bug on Android

Hi,

unfortunately the Google maps component does not properly work on Android. For example the show my location button is enabled but not shown in Android… Works fine on iOS. Is there a way to solve this? also the map “on user location change” block works perfectly fine on iOS to center the map at users location but on Android it does not seem to work at all or extremly slow and I have to use the location sensor instead because it would stick with the preset coordinates…

Also - not directly map related: the “FAB” that I created and placed on top of the map has a weird different shadow on Android and iOS…

Any solutions or advices?

Best, Chris

1 Like

Hi, @Chris! :wave:

Is this button raised or elevated (advanced property)?

1 Like

Yes it is but in iOS it looks totally different :thinking: but more worrying is that the show user location button is just missing on Android :confused:

1 Like

Hey @Chris, try adding a location sensor component in your project and then its “GetCurrentLocation” block at the top of your screen’s Start or Open events. I know it sounds silly as the Map component should automatically trigger and enable the device’s GPS but it really doesn’t on Android. So even if you don’t do anything with the “GetCurrentLocation” block, it will trigger the device’s GPS and enable the “My location” button.

There is also something else which is super interesting on Android. Let’s say you tap on a pin you place placed on a map. Sometimes this will make two icons appear on the bottom right of the map, one to navigate to that point using Google Maps and another to launch Google Maps and center to that point. What I noticed is related to the way Android handles background processes as if you have recently launched the Google Maps app and it still runs on the background, the above mentioned two icons will appear but if the Google Maps app does not run in the background either because the user closed it or the Android OS closed it to preserve memory, the two mentioned buttons will not appear when you tap on a pin.

You may want to check out my findings and come back with yours.

Konstantinos

2 Likes

Hi @Deluxe

thank you for this tipp. Unfortunately it is not working for me. I already added the get location block in the “OnMaploaded” because I had problems with Android not properly getting the location and I also tried to put it into “OnScreenStarts” but there is no location button displayed either :confused:

I think I will have to add a own button that triggers “get current location” for Android and unfortunately I can’t align it to be displayed on the map because I realized that those buttons have no function on Android while working fine on iOS… (https://github.com/thunkable/thunkable-issues/issues/301)

Wow this is weird. I haven’t experienced this so far - might be related to which Android version one is using… My test device for Android is a Xiaomi Mi A1 with (stock) Android 9.

Best, Chris

1 Like

Hi,

Unfortunately your advice

try adding a location sensor component in your project and then its “GetCurrentLocation” block at the top of your screen’s Start or Open events.

didn’t work on my Android device, either.

However, I noticed that the ShowsMyLocationButton
appeared when a Text Input on the same screen got focus.

The app I was using/modifying was the Cole Valley Covid-19 by David Wolber, also reachable on youTube

Not a solution, but might help track down the “culprit” :slight_smile:

Regards,
“emddom”

.

1 Like

According to my experience, you have to use both:

  • First you have to add the locationSensor, and then call “GetCurrentLocation” --> In Android you will see one alert window asking for permison (the first time), you have to accept it.

  • Add a Text Imput and get it focused as @emddom said

Black magician?? Maybe…

Ekran Alıntısı

this code means = white screen crash. what is changed? It was working. But now when “longpress, on marker press” etc. app crashes. is there an update or something?

2 Likes

idk but they messed something up and now it results in a blank screen, which is really annoying :roll_eyes:

Its been a month for fixing. I didn’t even wait in expectations for my own wedding :slight_smile: This is much painful.

1 Like

yeah this is really annoying - I regret paying again for the PRO version, as there are so many old and even new bugs that prevent me from continuing work on my projects… the platform is just not yet usable for professional work what the PRO plan suggests… it‘s really sad but I think I might be better of learning react native myself and create my projects elsewhere :confused: I guess I will have enough knowledge in the same time or even earlier than it takes to fix these annoying bugs… because some (like the textbox and image issues) don’t even seem like they where worked on for months / years now…

2 Likes