I've started having this problem after the Google Play Services update from the App store last week.
Basically: in my dev project i was using (not sure why) a Browser key created on the google developer console and everything was working fine.
I then changed the google key with an ANDROID key, updated the debugkey (by deleting it and got automatically a new one), re-calculated the SHA1 for the debugkey, updated the key in the manifest, but now the map it's not displayed in my activity/fragment.
I tried several times recreating the key, resigning the package, even changing the debugkey.
It does not get displayed both in the debug and release version, as well as when i create the apk for the store thru visual studio, signing it with the storekey.
I also tried several times to recreate a browser key on google console and using that in my manifest. No luck.
PS: permissions are set in both manifest as well as a requestpermission Location for marshmallow CoarseLocation and FineLocation from the code behind following the android 6.0 pattern for requesting permissions.
The map is displayed with a grey grid, in the output console i get com.google.android.gms signature not valid
<uses-permission android:name="com.xxx.permission.MAPS_RECEIVE" />
<permission android:name="com.xxx.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<here_i_have_my_key>" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
Thanks in advance
Related
I published app three days before, The map was working before, but now map stopped working. I added the SHA1 key in the google console. Do I need to create 2 different API key for debug and release?
Now while I am checking the un-signed app, the map is not working.
You need another API key for your release build if you want to restrict it (which is strongly recommended), because you'll need to get the SHA-1 fingerprint for your release certificate. The debug one won't work.
You can follow the instructions from Google's documentation.
Also make sure that your API key is set in your google_maps_api.xml file within your release folder and in your AndroidManifest.xml file.
Hope this helps.
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!
#Office-Store,
We have an issue with our O365 add-in. It isn't showing on the Powerpoint online store (It is showing on all other supported products).
After investigations we are assuming the issue is with the store hence we are reaching out for assistance.
We have ran the manifest validation tool and it is showing that we are supported with powerpoint online. See products supported in following link: https://appsource.microsoft.com/en-us/product/office/WA104381889?src=Manufacturing&tab=Overview.
When we site load the add-ins manifest it is also working as expected for Powerpoint online. We have seen this online add-in working previously.
These are the requirements in our manifest:
<Hosts>
<Host Name="Presentation" />
<Host Name="Document" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="DialogApi" MinVersion="1.1"/>
<Set Name="ImageCoercion" MinVersion="1.1"/>
</Sets>
</Requirements>
Since the Vidigami Add-in is available for desktop applications (Powerpoint and Word) as well as Word online we expect the Add-in to be available in the Powerpoint Online store.
I am using google_maps_flutter and location plugins to show user's location in my app.
I want to enable gps permissions from my app itself, it seems trivial but when I tried using plugins (like permission plugin), I am able to enable only app permissions to access location and not the gps permissions. I am able to check the location and give a toast if permission isn't there but how do I enable it from app itself?
I think what you want is to open the location settings, rather than the permissions, which is included in the AndroidManifest. Also most geolocator plugins have a request permissions method in them, if you need that, rather than the settings.
Assuming you want the user to open and turn on the location, in Android, I think you would need to create an intent, so it would look something like this..
import 'package:android_intent/android_intent.dart';
Then in your class...
static Future makeLocationDialogRequest() async {
final AndroidIntent intent = new AndroidIntent(
action: 'android.settings.LOCATION_SOURCE_SETTINGS',);
intent.launch();
}
And then later maybe do a check using your plugin of choice to check if the user did in fact enable the location.
Note, this is for Android only, so do a check beforehand if its an Android device,eg
var platform = Theme.of(context).platform;
With further info on android_intent here
Usually, you only need to include the permissions on the manifest.xml file (on Android), such as:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-permission android:name="android.permission.INTERNET" />
or on iOS by adding this values to your info.plist
NSLocationWhenInUseUsageDescription
NSLocationAlwaysUsageDescription
However, if you want to check or ask for a particular permission in runtime you can do so with simple_permissions package.
help me please...
for a very long time i have a problem.
i was made android application which implemnet google maps with eclipse. I have following a lot of tuorial from google. All of them failed. After I installed in my device, program just showing blank white map with only zoom control and sign google. I was put all of permission needed in my manifest, i have my apikey which i get from my SHA1. I got my SHA1 from windows - preference - android - build. I also tried to get my SHA1 from commandprompt and have the same result. Android google map v2 was switch on.
somebody, help me please.. whats wrong with my program..
I also had the same problem, in my case it was due to API KEY it was not correct. I regenerated key with SHA1 and problem solved.
This link has sample code you can download and check
You must get API key from Google Console by the link that provide into google_api.xml in android when create map activity in android studio.
so you copy API Key from google console and past into google_api.xml where YOURKEY HERE.After you must go to Google Console and enable key so it will work.
In my case it was an existing app that I cloned from GitHub.
What worked for me is to enable the SHA-1 of my signing certificate. Follow these short instructions.
Then I had the main developer add my SHA-1 fingerprint to the authorized packages for his relevant API Key here (in his login). Then it worked.