How to get Android Internal App Sharing key SHA1 to enable Google APIs?
Asked Answered
B

4

6

Google APIs are not working with Internal App Sharing, this might be due to the Google Play App re-signing which is mentioned in Share app bundles and APKs internally

How can I get Internal App Sharing key SHA1 to add on Google API console?

Brunswick answered 4/9, 2019 at 2:8 Comment(0)
B
8

You can find the Internal App signing key under Development Tools -> Internal app sharing -> App Certificates on Google Play Console after submitting your App.

Android Internal test certificate's fingerprints

Brunswick answered 4/9, 2019 at 2:39 Comment(8)
OK great, so once you have this key what do you do with it to get, say, Google Maps for Android to work within an app shared via Internal App Sharing?!Immure
@Immure Yes, you must use this fingerprint for GoogleMap. Firebase etc., only when you are using Internal App sharing.Brunswick
Please don't downvote unless you tested, this is the correct answer.Brunswick
The answer is correct as far as it goes, but insufficient. After finding this fingerprint, there is a tricky set of steps in the API console to add that fingerprint to the various APIs like Google Maps for Android. I figured it out, but it's very much non-obvious and part of the question being asked. Add that to the answer and I would certainly remove the downvote!Immure
@Immure Can you add the things you figured out in a separate answer then?Monomania
@Immure can you please guide with tricky steps. I am facing issue with google map while sharing app through internal app sharing. Map not shown while sharing app bundle through internal app sharing.Infantryman
@KetanMehta see the Answer and find the SHA1 and add SHA1 under Google Cloud's Map APIs.Brunswick
@ChathuraWijesinghe Thanks man. Did same steps and now able to see MAP in internal app sharing build.Infantryman
C
0

You can get key by pragmatically by doing this surround with try catch

private void printKeyhas()
{
  PackageInfo info = getPackageManager().getPackageInfo(getPackageName()),PackageManager.GET_SIGNATURE);

for(Signature signature.info.signature)
{
   MessageDigest md = MessageDigest.getInstanse("SHA");
   md.update(signature.toByteArray());
  log.d("KEY_HASH",Base64.encodeToString(md.digest(),Base64.DEFAULT));
} 
}
Calculated answered 4/9, 2019 at 4:37 Comment(0)
L
0

You can find App Certificates on Google Play Console , Release Management -> App Releases -> Manage Internal app sharing -> App Certificates. enter image description here Copy SHA-1 certificate fingerprint that is used to add in Google Cloud Platform with your associated API Keys like Map Key, Device Verification key.

You can easily generate Keyhash(ssh) through SHA-1 fingerprint by following command of OpenSSL

echo < Genrated SHA1 Fingerprint> | xxd -r -p | openssl base64

Keyhash is used on facebook dev console

Lull answered 7/11, 2019 at 5:42 Comment(0)
B
-2

Type this in your console or command prompt :

keytool -list -v -keystore C:\Users\Hp\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
Blok answered 21/6, 2021 at 3:36 Comment(1)
the above command is to get the Android debug key SHA1 NOT the Internal App Sharing key SHA1Brunswick

© 2022 - 2024 — McMap. All rights reserved.