2

I have done an Android app which takes the data from a server database. If I install it from an USB installation or installing an unsigned apk everything works properly but, if I install it from a signed apk (or downloading it from PlayStore) the maps activity does not work.

Once I have installed it, my app does a request to an API in order to take the data in its database an fill the app's db so I can show the data from the app db.

I know it is getting the data since I can see everything allright but maps Activity, which looks like following:

USB/Unsigned apk: USB/Unsigned apk:

Signed apk: Signed apk:

Does anyone know if there is any diferent between these two apks that may be causing this unexpected behavior?

Thanks in advance

rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62
Aldeguer
  • 821
  • 9
  • 32

3 Answers3

4

You need to create a Release key with your keystore file and password for Signed Apk

Then u have to add the key in developer console

Step 1

in command prompt:

 keytool -list -v -keystore /home/rafsan/Desktop/Android/Projects/TestApp/keystore.jks -alias test -storepass password -keypass password

where

/home/rafsan/Desktop/Android/Projects/TestApp/keystore.jks is the path where your keystore file for the signed apk is present

test is the key alias name used while genrating the signed key store

and password is the password used while signing the apk

Step 2

Go to Developer console

and add the release key with package

A3:33:EA:3D:5E:....................85;com.example.package_name
rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62
2

Do you generate release certificate ? Check here.I think this solve your problem.

Community
  • 1
  • 1
0

You have created a Maps API key with your debug certificate but not with your release one.

Follow the steps here and get a new key

https://developers.google.com/maps/documentation/android-api/

Kuffs
  • 35,581
  • 10
  • 79
  • 92