Tuesday, 15 May 2012

To do list for publishing your Android application on Google play app store

Let us go through the steps to be followed for publishing an android application.

  • Confirm that your application is free from errors. If possible avoid warning also to make your code clean and beautiful.
  •   Test your apk with emulator, do this for many times, so that you can find out small mistakes. 
  •  As a final test copy your apk to any device that support you application's android target version,there you can install it and see how it works.
I recommend this because you may have used some local resources like the local network of your computer system(with or without proxy settings) or local domain names,etc.. So do a final check to confirm everything is accessible from the device. ]

If all these works fine, then you can start preparation for publishing your great application.
  • You need a gmail account to open a google play developer account . If you have one, use it. Otherwise sign up for  new account here

  • Now you can open a new Google play developer account here. .

Now you are in Google play console. There is simple registration process to complete. Go with that. You have to pay a one time registration fee $25, then you can publish your apps anytime you want. For the completion of registration process and verification of your payment details,it will take 24-72 hours, so pls avoid mistakes because it will waste your another 2-3 days. 

[Do not forget to check your account status regularly by login to the developer console. ]

You don't have to waste your precious time on these long hours. You can start preparation for publishing now itself. Because you can upload you apk that is ready to publish here and you can create resources needed for your application and can also edit the app details. But you can publish it only after completing the registration.

 If there is any problem with your registration after uploading the apk,don't be panic..the google play help team is there to support you. You can mail them directly to ask your doubts. they will help you until you get satisfied.

For you doubts in apk publishing and updation contact email id:

If you have any problems in registration process contact :

Now we can start

  • Get the public key of you google play account . Go to "Edit profile" link in the google play android developer console home page. There you can find your public key under "Licensing & In-app Billing" section. You need this value for licencing your app.
 [ You are not forced to do the licensing for your app. But it is a recommended way of publishing, to make your apk safe. The alternate facility available is to do the copy protection which will be removed soon.So it is better to use for both paid and free apps]

 Steps for licencing your app
  • Now you need  License Verification Library (LVL). First you check whether they are already with your android installation. For that go to android sdk folder(installed Android folder),  open extras->google->market_licensing->library.
  • Copy the contents of src folder inside the library folder to your application src folder  
           [ and ].

  • Adding License to your application
  Now see the sample folder inside the market_licensing folder. There you can find a sample licensing activity which you are going to add to your application


import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings.Secure;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;


 * Welcome to the world of Android Market licensing. We're so glad to have you
 * onboard!

 * The first thing you need to do is get your hands on your public key.
 * Update the BASE64_PUBLIC_KEY constant below with your encoded public key,
 * which you can find on the
 * Edit Profile
 * page of the Market publisher site.

 * Log in with the same account on your Cupcake (1.5) or higher phone or
 * your FroYo (2.2) emulator with the Google add-ons installed. Change the
 * test response on the Edit Profile page, press Save, and see how this
 * application responds when you check your license.

 * After you get this sample running, peruse the
 * licensing documentation.

public class MainActivity extends Activity {
    private static final String BASE64_PUBLIC_KEY = "REPLACE THIS WITH YOUR PUBLIC KEY";

    // Generate your own 20 random bytes, and put them here.
    private static final byte[] SALT = new byte[] {
        -46, 65, 30, -128, -103, -57, 74, -64, 51, 88, -95, -45, 77, -117, -36, -113, -11, 32, -64,

    private TextView mStatusText;
    private Button mCheckLicenseButton;

    private LicenseCheckerCallback mLicenseCheckerCallback;
    private LicenseChecker mChecker;
    // A handler on the UI thread.
    private Handler mHandler;

    public void onCreate(Bundle savedInstanceState) {

        mStatusText = (TextView) findViewById(;
        mCheckLicenseButton = (Button) findViewById(;
        mCheckLicenseButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {

        mHandler = new Handler();

        // Try to use more data here. ANDROID_ID is a single point of attack.
        String deviceId = Secure.getString(getContentResolver(), Secure.ANDROID_ID);

        // Library calls this when it's done.
        mLicenseCheckerCallback = new MyLicenseCheckerCallback();
        // Construct the LicenseChecker with a policy.
        mChecker = new LicenseChecker(
            this, new ServerManagedPolicy(this,
                new AESObfuscator(SALT, getPackageName(), deviceId)),

    protected Dialog onCreateDialog(int id) {
        // We have only one dialog.
        return new AlertDialog.Builder(this)
            .setPositiveButton(R.string.buy_button, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(
                        "" + getPackageName()));
            .setNegativeButton(R.string.quit_button, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {

    private void doCheck() {

    private void displayResult(final String result) { Runnable() {
            public void run() {

    private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
        public void allow() {
            if (isFinishing()) {
                // Don't update UI if Activity is finishing.
            // Should allow user access.

        public void dontAllow() {
            if (isFinishing()) {
                // Don't update UI if Activity is finishing.
            // Should not allow access. In most cases, the app should assume
            // the user has access unless it encounters this. If it does,
            // the app should inform the user of their unlicensed ways
            // and then either shut down the app or limit the user to a
            // restricted set of features.
            // In this example, we show a dialog that takes the user to Market.

        public void applicationError(ApplicationErrorCode errorCode) {
            if (isFinishing()) {
                // Don't update UI if Activity is finishing.
            // This is a polite way of saying the developer made a mistake
            // while setting up or calling the license checker library.
            // Please examine the error code and fix the error.
            String result = String.format(getString(R.string.application_error), errorCode);

    protected void onDestroy() {


Edit your main activity with this sample. Enough comments are there to help you. 

Replace public key with yours, and enough comments are there to edit. Copy the methods except the onCreate() and copy the code inside the onCreate() to your onCreate() method. Thats all.

You cannot test your code in this time, since it is checking the licensing,you cannot access the functionalities with emulator, you will be getting a message saying that you need licence.

  • Next you need to get a debug key that is valid for minimum 50years
        For that first you need to create a keystore. Open terminal(in linux) or command prompt(in widows).
Run the following command:
  keytool -genkey -v -keystore keystorefilename.keystore -alias aliasforkeystore 
  Provide the details after specifying a password for the keystore.Then a keystore file in the name keystorefilename.keystore will be created on the current path.
  •   Now open Eclipse,->  Select you application. Select File->export->export android application(sub option under Android). Next->browse project->Next->select use existing keystore file->browse keystore file and enter password(you just created)->Next->select create new key->Enter the details(Remember to give validity field greater than 50years)->next->finish.
Now your apk is ready to upload. Check you have entered a version code and version name which should be changed on each updation.

Now go to Google play. Upload you apk there. Edit the product details. You can add graphic assets,video link(demo for your app) etc.

If your registration process was completed, publish your app and test the licensing procedure. It will work fine, if you have done everything clean. If it has any problem, don't get upset. Edit your application based on the error showing. Change the version code and version name -> clean & compile your app -> repeat process for the debug key->  get your apk-> upload it as a new apk on google play. Deactivate older apk and activate your new apk and save.

You can change the product details any time you want. Just save the details and wait for a while, you will get your update on market page.

There is an option to add expansion files when your apk is of more than 50MB.

Now everything done..

Go ahead with your Android journey..Best of luck.. :)


  1. Very helpful Article


  2. Hello Sir........
    I am new in mobile Apps Development
    i ma student. I develop my app in sencha Touch Framework..
    and i want to publish in google app store...
    is their way to publish app without paying money....

    1. I Am not familiar with Sencha Touch Framework.Hope this will help!/guide/native_android

  3. can you please suggest me to publish my app other than google play


  4. hi i have an app. i want to publish that app in playstore.i have checked this app several times and confirmed that it is error free.This app(free) is not for everyone but only for my clients.The reason behind uploading to playstore is that everytime i dnt want to send e-mail to everyone,just upload it in playstore so that they can download it from there.So please tell me what are the formalities for uploading a app in google playstore as i am new to this platform

  5. hi,

    I am new to android development and am trying to build an ecommerce app. Could you please tell me how I should update the app's product listings or do I need to buy hosting for the database to update the app from there via an admin panel.

  6. Google Play Store Registration need credit card and many people have no valid payment method I offer a free solution for all
    I offer 2 services
    If you have website I will convert into Android Mobile App.
    If You have App and Want to publish Free on Play Store I Will Publish your App On Google Play Store
    If You want to develop Responsive Website I will do all these things in very friendly cost as you like.
    Visit us
    IT Zem Solutions

    Contact Skype: Rohibook
    Whatsapp: +923008608035

  7. Is there checklist from android to make sure the quality of app.

  8. I need some help figuring out resolution for mobile app design?
    church app design

  9. great post Vendorzapp provides Mobile apps for small business, Ecommerce android apps India, iOS ecommerce apps, Ecommerce website Pune, Ready ecommerce website and apps. Android ecommerce apps then visit now Ecommerce android apps India, iOS ecommerce apps, ecommerce website for small business call us +91-9850889625