Google Map browser version warning - gmlib

How do i remove this message on the google map:
"You are using a browser that is not supported by the Google Maps JavaScript API. Consider changing your browser."
Thanks for the help

this appeared suddenly a few days ago.
I checked the megademo and saw that this program doesn’t show the error.
Here my solution: Search for 'ControlIEVersion' in the MegaDemo Project that is installed with the gmLib, and add this procedure to your application then call it in the form create of your application. Or set the required registry key value manually.
GMMap.Active := true;
ControlIEVersion;
Regards Henry

Related

Force Update application by using custom api in flutter

I am getting sick of thinking about how to make application force update by controlling the json api. I want to call json api from my server and want to make your if the app is need to update and show the message box and navigate to this update application. Please share me a sample if you know how to do it in flutter. I really appreciate.
In one of my previous jobs, I was asked to add a force update function to the app. I personally don't like it when apps force update you (except when you are in a really old-old version).
This is how I did it (i am not going to paste the code, I am going to simply explain it) when the app started up we had a function that checked an API for the latest version of the app (that app worked only with internet access). If the API returned a newer version we simply displayed a msg informing the user that there is a newer version. If the API had the forceupdate value, I was displaying a msg and disabling everything. The user couldn't perform anything in the app until he updated it to the latest version.

Google Maps Android API: Authorization failure. Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists

I am getting this error:
E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: [The key...]
Android Application (<cert_fingerprint>;<package_name>):
Instead of the map working correctly, this is what I see:
In my app/build.gradle, I have this:
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-awareness:16.0.0'
implementation 'com.google.android.gms:play-services-cast:16.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
play-services-location is what I need for the Google Maps, correct? I was looking at the list at https://developers.google.com/android/guides/setup and I assume that Google Location and Activity Recognition - com.google.android.gms:play-services-location:16.0.0 is what I need for Google Maps. Is this correct?
UPDATE 1: I already have Maps SDK for Android enabled:
The error says: Ensure that the "Google Maps Android API v2" is enabled.. Is it referring to the Maps SDK for Android that I am showing in the screenshot in this UPDATE 1?
UPDATE 2: I have Maps SDK for Android enabled:
When I click the MANAGE button, I can go to the section to configure credentials that I showed in UPDATE 1.
UPDATE 3: I see the Map displayed correctly on all versions of Android on the Emulator. But on physical devices, the map never shows up. I see the Google logo and the red balloon, but now the map when I run the app on physical phones. Only on the Emulator everything works. Any ideas why?
UPDATE 4: See my solution at https://stackoverflow.com/a/56307654/4242086.
Hey I had the same problem today!,I solved it very easy for first you have to go https://console.developers.google.com and enable the android SDK maps and then create the api key, return in xamarin go to your manifest and add the google maps api key
https://learn.microsoft.com/it-it/xamarin/android/platform/maps-and-location/maps/obtaining-a-google-maps-api-key?tabs=windows
This is the documentation
(I typed this fast because am on mobile now sorry)
follow to below link for generate google api key:-
https://developers.google.com/maps/documentation/android-sdk/map-with-marker
Android Code Reference Link:-
https://www.zoftino.com/android-mapview-tutorial
I followed this tutorial and I was able to fix it: https://www.youtube.com/watch?v=sJBlQv6IptQ. The video makes references to this tutorial: http://ramsandroid4all.blogspot.com/2016/01/google-maps-android-example-in-android.html.
In my case, what I did was to create a new project at https://console.developers.google.com/. I used Android apps for Application restrictions:
For the Restrict usage to your Android apps section, I had to provide a Package name and a SHA-1 certificate fingerprint. The Package name was in my app/build.gradle, specifically here:
applicationId "[my package name]"
The SHA-1 certificate fingerprint I found it from Android Studio by running signingReport:
The result included something like this:
Alias: AndroidDebugKey
MD5: [The value]
SHA1: [The value]
SHA-256: [The value]
Valid until: Wednesday, May 5, 2049
----------
BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
16:31:44: Task execution finished 'signingReport'.
Now the map works correctly in my Android app:
UPDATE 1: To my surprise, the maps were working correctly only on the Android Studio Emulator but not on real Android physical devices. The solution was what I posted at https://stackoverflow.com/a/56307654/4242086.
I got the exact same symptoms when I moved the project to a new computer. My solution was to generate a new key based on the error message. The google_maps_api.xml file had an URL in a comment to generate key but that is a static thing, so after moving the project to a new computer I rewrote the URL to match the error message's version.
https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=[put-the-thing-here]
Generated the key, put it in the XML file and it worked well.
In my case, I did everything right. but was still getting the error it turned out that changing the attribute "android:name" in the manifest file solved the issue.
Change
android:name="com.google.android.maps.API_KEY"
To
android:name="com.google.android.maps.v2.API_KEY"
Time changed the configurations steps. Here the new one.
Set up your project https://console.cloud.google.com/projectselector2/home/dashboard
Enable Google Maps API. Go to https://console.cloud.google.com/apis/library?filter=category:maps&_ga=2.192684329.2027491681.1618180744-3962552.1609436892 choose the API you want to enable
Go to API Credentials https://console.cloud.google.com/project/_/apiui/credential of your project
On the Credentials page, click Create credentials > API key.
The API key created dialog displays your newly created API key
Click Close.
In Android Studio, open your app-level build.gradle file and add the following code to the plugins element. id 'com.google.secrets_gradle_plugin' version '0.5'
Save the file and sync your project with Gradle
Open values\google_maps_api.xml and replace YOUR_API_KEY with the API got in the point 4.
Check in your AndroidManifest.xml the MAPS_API_KEY is replaced with your actual key
android:name="com.google.android.geo.API_KEY"
android:value="${MAPS_API_KEY}" />
Insert in your AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
Go to the APIs & Services > Credentials page https://console.cloud.google.com/project/_/apiui/credential
Select the API key that you want to set a restriction on. The API key property page appears
Under Key restrictions --> Select Android apps.
Click + Add package name and fingerprint.
Enter your package name and SHA-1 certificate fingerprintClick Restrict key.
Select Maps SDK for Android from Select APIs dropdow
To finalize your changes, click Save.
For those who still haven't figured it out yet, again take a look at the logging below the error message. Pay close attention to your certifcate_fingerprint and package_name printed out in the logging. Compare these diligently with the ones specified in your Google Development Console.
I picked up an old hobby project again after almost an entire year of inactivity. I probably changed something somewhere that triggered a change of the certificate fingerprint, or visa versa.
Hope this helps!

Error GET Google Places API

Today, Google places API stopped working on my site. Yesterday, it was working just fine. When I call it, I get following error in developer's console:
GET https://maps.googleapis.com/maps/api/place/js/AutocompletionService.GetPredictions?1slux&4scs-CZ&9sgeocode&15e3&key=AIzaSyCe8-UQIQuXtaQ5xVOqtwnCtZOjDtXj4Co&callback=_xdc_._8rz5bv&token=109805 net::ERR_ABORTED
The problem isn't in Google maps API itself, because that works just fine (without the Places). If I take fresh code snipper from Google website, it is still not working, as you can see here. So the problem isn't in my code, but in the API itself. I checked my project on Google site and the API is enabled, so it should work. Maybe it's connected to my API key? I haven't tried creating a new one, I don't want to have too many of them.
SOLUTION: After approximately one hour (from posting this), it started working again. Apparently a problem on Google side. So if you have the same problem:
Go to your Google account and check in API manager if the Google Places API service is enabled.
If it is enabled, wait and be patient. Hopefully it will fix by itself.

ExpiredKeyMapError on newly generated API key

I have just generated an API Key to enable us to display a Google map on our website but I'm getting the ExpiredKeyMapError. This is the exact same issue as this stackoverflow query from 8 months ago, but that has never received a solution: Google Maps ExpiredKeyMapError with recently created API Key
When the page first loads, the map shows for a split second and then it disappears, to be replaced with a grey box that says:
"Sorry! Something went wrong. This page didn't load Google Maps
correctly. See the JavaScript console for technical details"
And when I pull up the console, this is the error message I get:
Google Maps API error: ExpiredKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#expired-key-map-error
SCRIPT12008: WebSocket Error: Incorrect HTTP response. Status code
403, Forbidden
and that last line just keeps repeating.
Any help much appreciated because I have no idea how to solve this myself.
I had the same error after generating a new API key, but I had JavaScript API already enabled and everything correctly setup.
While searching for an answer and checking what else I can do, the key started to work. So every single time you create a new key, be patient and expect it to work within 1-8 minutes.
I discovered that it was not working because I hadn't separately enabled the Google maps javascript API. Once I'd done that, the map started working a few minutes later.
I discovered that it was not working because I hadn't separately enabled the Places API. Once I'd done that, the map started working a few minutes later.

Alert "This page was unable to display google maps element." javascript error "RefererDeniedMapError"

I'm getting this alert message in one of my sites that uses Google Maps JavaScript API v3:
"This page was unable to display google maps element. See the terms of service"
And in the javascript console this error:
"RefererDeniedMapError"
I searched in internet and its seems to be a new bug, I only found reports in this month (June 2015).
It seems to be a domain specific problem, because the same code works in others domains.
In my case the web page were working without an API key. After this error I generated and added an API key to my code, but it doesn't solve the problem.
In the https://console.developers.google.com/ doesn't appear any useful information. The quota of map loads is OK, but when I load the web page the map loads are not counted (probably because the error).
Does anyone has a clue about how to solve the problem?
I was getting the same error message, and realized I replaced with below one
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
I was getting the same error message, and realized I needed to remove "signin=true" from the google maps call.