Android Projects

Android Development Books

Wednesday

How to Publish to the Android Market



So, you’ve finished developing your Android application after weeks of hard work and want to release your creation to the world? This article will guide you through the process of doing so.

The Checklist

First and foremost, there are a few crucial checks you have to go through before getting your application ready. Ask yourself the following questions:
  • Have I tested my application extensively?
    If the answer to this is “not really,” then you need to head back and do some rigorous testing. In addition to basic tests on the emulator, you should also test your application on a real, physical device. In an ideal world, you would test on multiple hardware devices running different versions of the Android OS. Buggy code makes for poor sales and a worse reputation.
  • Does my application perform well?
    Performance is really important, especially if you’re programming a game. If your application is not responsive enough in certain cases, try to see if you can optimize those spots.
  • Have I decided on SDK compatibility?
    According to data collected around August 2, 2010, Android 1.6 is still active on 20.3% of devices that have accessed the Market and Android 1.5 enjoys 15.3%. Though Android 2.1 obviously dominates with nearly 60%, it may prove to be a good decision to support 1.6 if your application doesn’t require new features introduced in the later versions. In fact, some features like Move App to SD Card don’t even require 2.x to be set as the minimum supported SDK version.
todo
Distribution statistics from Aug 2, 2010. Source: Google

Getting your application ready

We’ll start off by opening AndroidManifest.xml and configuring it.

Step 1: Request necessary Android permissions

Make sure that you’re requesting all necessary permissions, otherwise your application won’t work. Examples for permission declarations include:
  1. <uses-permission android:name="android.permission.VIBRATE"/>  
  2. <uses-permission android:name="android.permission.INTERNET"/>  
  3. <uses-permission android:name="android.permission.REBOOT"/>  

Step 2: Specify a name and icon

Name your application and give it an icon using the android:label and android:icon attribute in theapplication tag. For example:
  1. <application android:label="@string/app_name" android:icon="@drawable/myIcon">  

Step 3: Configure version manifest data

Pick a version your application using android:versionCode and android:versionName in the manifest XML tag. versionCode should have an integer value that you must increment for every application update, as this will be used by the system. It’s a common practice to start at 1.
versionName on the other hand represents a user-friendly value. Feel free to set this to whatever you think is appropriate – 0.1 or 1.0b or 2.4.1 would all technically work.
  1. <manifest xmlns:android="http://schemas.android.com/apk/res/android"  
  2.             package="com.example" android:versionCode="1"  
  3.             android:versionName="1.0.0">  

Step 4: Set compatibility options

If you’re utilizing newer Android features that aren’t available in older versions, then you’ll have to specify a set of version requirements. To do this, create a bodiless XML tag named uses-sdk. The following attributes are at your disposal:
  • android:minSdkVersion The minimum Android platform API level on which your application will be able to run.
  • android:targetSdkVersion The API level that your application was designed to run on.
  • android:maxSdkVersion An upper limit for compatibility. Don’t set this unless you have a very good reason to.
Note that the API level refers to a special identifier. Here’s a handy table that you can refer to:
API LevelAndroid Platform Version
11.0
21.1
31.5
41.6
52.0
62.0.1
72.1
82.2

Step 5: Cleanup files and remove logging

Go through your project and remove any logging calls, old log files, private data and unwanted resource files.

Step 6: Sign and ZIP-align your application

One of very important distribution requirements is that Android applications must be digitally signed with a certificate that the developer holds. This is used to ensure the authenticity of an application, so it’s important that you pick a strong password for your private key and ensure that you keep it safe.
So to start off, you’ll need a private key in order to sign your final APK file, as the debug key that IDEs use sign your compiled apps by default can’t be used.
If you’re using Eclipse, you can use the Export Wizard, a friendly GUI-based tool. Even if you use a different IDE, it might prove to save a lot of time if you use Eclipse for exporting your application, unless of course your IDE offers the same functionality.
  1. Select the project and select File > Export.
  2. Open the Android drop-down and select Export Android Application
  3. Follow the wizard’s steps to compile, sign and ZIP-align your application.
todo
Create a new one for the first time or use an existing one.
todo
Your validity period must extend 2033 or else the Android Market will reject your app!
The alternative is to use the command-line based keytooljarsignerzipalign and/or a program likeJAR Maker to take care of generating a certificate and signing the APK file with it. ZIP-alignment is an essential step as it provides a significant performance boost in terms of memory required for loading it.

Becoming a Market publisher

Registration

In the next section we’re going to examine the final steps of registering at the Android market and the process uploading your application.
  1. Register as a publisher and setup your profile.
  2. Read and agree to the Android Market Developer Distribution Agreement.
  3. Pay a registration fee of $25 USD via Google Checkout.
To publish applications on the Android Market, you must be a registered developer. Head over tohttp://market.android.com/publish and sign in with your Google account. Next, fill out all the required information along with your real phone number, which Google will use to contact you in the event of an emergency or a problem with any of your Android applications. If you can’t decide on a developer name, don’t worry. Just use your real name for now – you can always change that later via your profile page.
You should read the Android Market Developer Distribution Agreement carefully, as you are required to accept the terms and you will be legally bound to them upon paying the registration fee. While you’re at it, take a look at the official Content Guidelines.
Click the Google Checkout button and pay the one-time registration fee and you’re done!

Uploading an application

Login to your publisher account and click “Upload an Application”. Fill in all of the form data and include screenshots if you can and provide a precise, short and well-formatted description. You can also choose whether or not you want to release it as a free or paid app – though you need to be a registered Google Checkout Merchant to do the latter and it’s currently only available in a handful of countries. Lastly, click “Publish.” Congratulations, you’ve just successfully published an application to the Android Market!

 Article copy from http://mobile.tutsplus.com/

Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

Thanks for your comment

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

Related Posts Plugin for WordPress, Blogger...
© Google Android Lovers
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0