Páginas

sábado, 25 de enero de 2014

Signing your app to publish on Google Play (with Google Maps)

Hi everyone !

Today, I want to show you how to sign your application before to publish on Google Play, in another words, we have to write internally that you are the developer of that app.

STEP 1: CREATE A PRIVATE KEY

When we was debugging the application, we generated a debug keystore. Now we have to create a new one. To do this, go to "bin" directory on your JDK (Java Development Kit) folder. We need a tool called "keytool" that it is in this directory and write the following:
keytool -genkey -v keystore <path_for_the_new_key> -alias alias_name -keyalg  algorithm_key -keysize key_size -validity validity_days
For example:
keytool -genkey -v keystore C:/Users/danigonlinea/new_key.keystore -alias danigonlinea -keyalg RSA -keysize 2048 -validity 15750

NOTE: If you have not installed it, you can do it in this link: JDK.

STEP 2: OBTAIN SHA1 AND MD5 FROM THE KEY TO GET GOOGLE MAPS API KEY

First thing we have to do is to sign the maps on the application, we need to obtain the api key. To this way, our future users can use the maps in the application. If you have not maps on your application, you can jump this step and keep reading after this step.

keytool -list -keystore <path_new_key_created> -keypass password_key -v
For example
keytool -list -keystore C:/Users/danigonlinea/new_key.keystore -keypass perico_palote -v

STEP 3: PUT THE SHA1 ON GOOGLE DEVELOPER CONSOLE

Access to this website, link: Google Developer Console. You have to activate Google Maps and obtain a new Android Key for your application using SHA1. For more information, get in Obtain Google Maps API Key.

STEP 4: Export your Android application.

In ADT Bundle Eclipse, Go to File -> Export -> Export Android Application. Complete the wizard. Select the keystore that we had created in the first step and remember the alias name and password.

NOTE: if you get fail on the process, try to clean the project on Project -> Clean...
NOTE 2: remember to use a correct package for your source code on your project. It have to be unique on entire Google Play!

Finally, you have your app ready to publish on Google Play.

No hay comentarios:

Publicar un comentario