Andy
Andy

Reputation: 129

Nearby Messages API not working after release

I´ve got a problem with the Nearby Messages API. Following scenario: When I test my App with Android Studio everything is working fine, Messages are sent and get received. When I build an APK and install the generated (and signed) APK on the phone, Nearby Messages doesn´t work anymore. It won´t find any messages... Does anyone had a similar problem or knows a solution (better knows the reason WHY it´s not working)?


UDPATE

Keys

Upvotes: 0

Views: 285

Answers (2)

Dishonered
Dishonered

Reputation: 8841

In the side bar of Android bar , you will have the tab "build variants" , change the option from debug to release and then run the signing report , you will get the release sha -1 key.

Upvotes: 1

Atul Vasudev A
Atul Vasudev A

Reputation: 463

When you sign apk for release with a Keystore, the SHA-1 fingerprint will be different than the debug version. This prevents the Google apis from working.

Use this in CMD to find out SHA-1 of release apk

keytool -list -v -keystore mystore.keystore

Upvotes: 1

Related Questions