i've used Android Maps SDK for over 5 years in our project. Suddenly the map is blank. Now i've updated all data in google console regarding the payment, i thought maybe thats the problem. I created a new second api key for testing purposes and re-implement the whole map fragment with the new api key. The only exception that i get is the following:
GoogleApiManager de..xx.xxx E Failed to get service from broker.
java.lang.SecurityException: Unknown calling package name
'com.google.android.gms'. at
android.os.Parcel.createExceptionOrNull(Parcel.java:3023) at
android.os.Parcel.createException(Parcel.java:3007) at
android.os.Parcel.readException(Parcel.java:2990) at
android.os.Parcel.readException(Parcel.java:2932) at
m.cpc.q(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:180) at
m.cno.run(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:54) at
android.os.Handler.handleCallback(Handler.java:942) at
android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loopOnce(Looper.java:226) at
android.os.Looper.loop(Looper.java:313) at
android.os.HandlerThread.run(HandlerThread.java:67)
i try to solve that problem for three days but cant find any solution, and yes, the Maps SDK for Android is enabled. Does anyone know whats the problem?
I want to show a map in my App. Using the google maps sdk for android.
UPDATE:
After the exception i get this warning.
Unable to update local snapshot for com.google.android.libraries.consentverifier#com.google.android.gms, may result in stale flags.
java.util.concurrent.ExecutionException: m.fdz: 17: 17: API: Phenotype.API is not available on this device. Connection failed with: ckg{statusCode=DEVELOPER_ERROR, resolution=null, message=null}
at m.gso.s(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:21)
at m.gso.get(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:5)
at m.gvm.a(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:2)
at m.guh.h(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:10)
at m.ffn.c(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:1)
at m.ffu.run(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200042.587833741.587833741:5)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
Caused by: m.fdz: 17: 17: API: Phenotype.API is not available on this device. Connection failed with: ckg{statusCode=DEVELOPER_ERROR, resolution=null, message=null}
...
Problem solved !
After days of research the reason for that behaviour was complete different. The Android Maps SDK and the API Key works fine and as expected.
The reason was the following:
Because I using a self-signed ssl certificate for server validation, I added a custom X509TrustManager implementation to my network class some weeks before. And the problem was: I added it to the class HttpsUrlConnection (huge mistake!) and not to the instance of that class.
The google maps api called network requests for tiles, but they ended in my custom X509TrustManager.. Inside this custom implementation I check only for my self-signed certificate and not for google certificates.
So all google maps sdk requests where blocked.