IT tutorials

Android Application Development : Signing and Publishing Your Application (part 1)

4/20/2013 8:22:08 PM
- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire

1. Test Your Application

You’ve probably been developing your application using the Android Emulator that is part of the Android Developers Kit. If you haven’t already done so, take the time to load your application on a real Android device (such as the T-Mobile G1 phone), and test the application again. The emulator is very good, but there are a number of things that can be different between the desktop emulation and a real device:

Screen resolution

The Android SDK emulates a device like the T-Mobile G1, with a half VGA screen (320×480), roughly 3.2 inches in diagonal measure. Real Android devices will have a variety of screen shapes, sizes, and resolutions, so you need to know how your application will function on those different devices.

Screen orientation

The SDK emulates only portrait mode, with the screen taller than it is wide. Many Android devices (including the T-Mobile G1) support switching screen orientation, and you need to be sure your application behaves appropriately in all orientations.

Touchscreen operation

The emulator uses mouse clicks and movements to mimic the touchscreen on a real device, but there’s nothing like a real touchscreen. On a real device you can get a much better sense of what it will be like for users to interact with your application.

CPU and network performance

On the emulator, you are using your PC or Mac to emulate an ARM processor. The application’s speed is tied to the speed of your underlying host processor, which typically consists of multiple multigigahertz multiprocessors. If your application is at all performance sensitive, you’ll want to see how it functions on real devices. Similarly, the emulator is using your host’s network connection, which may be broadband, to access the Internet. On a real device your network connection will either be WiFi or a mobile network (GPRS, EDGE, HSPA, or 3G, depending on your location), and the connection’s speed and latency will be changing as the phone moves around. You want to know how these factors affect the operation of your application, and how it appears to the user.

The emulator is quite flexible, and some of these things can be tested to some degree by manipulating the emulator setup in DDMS . But again, it is important to stress that nothing can replace testing on real Android devices.

2. Attach an End User License Agreement If Desired

Virtually every application that you download onto a desktop or notebook computer will contain an End User License Agreement. You should seriously consider whether you want to attach such a license to your application and have users agree to it before they install the application on their phone. Typically it limits what users are allowed to do with the application, defines whether it can be used for commercial purposes, specifically does not allow reverse engineering, and tries to protect you, the author, should something go wrong and someone has reason to bring a lawsuit against you. There are many such EULAs available on the Internet. You can either adopt one of those as your own or hire a lawyer to create a unique one for you, but the use of a EULA is strongly advised.

3. Create and Attach an Icon and Label

When your application is installed (on either the emulator or a real device), an icon and a label are placed on the Application Launcher that is part of your Android Desktop. This is how most users will launch your application, so you need a small graphic (in the form of a PNG file) for the icon, and a short label for your program. Icons are small square (64×64 pixel) pictures. Figure 1 shows the one we used for MJAndroid.

Figure 1. MJAndroid icon

The icon and the label are both assigned in the AndroidManifest.xml file. Here is the section of the file for MJAndroid that defines the icon (in the file icon2.png, located under the res/drawable directory) and the label (from the strings.xml file under res/values):

    <application android:icon="@drawable/icon2" android:debuggable="true">
      <uses-library android:name="" />
        <activity android:name=".MicroJobs" android:label="@string/app_name">


4. Clean Up for Release

If you’re like most developers, your path to completing your application was not linear. You tried some things, kept some, stopped using others, put in diagnostics when things didn’t work quite right, named some things that you later wished you’d named differently, and so forth. Now is the time to clean all that up. Once your application is out in the real world, you’ll have to support this version, and it would be good for you if the code were as clean as possible:

  • Turn off debug and logging code. You don’t really want your deployed application eating up precious mobile phone storage by generating logfiles, and the user won’t be able to understand your debug messages anyway. If you haven’t already, create a boolean to switch them off and leave them off for now. And remove android:debuggable=true from the AndroidManifest.xml file (see the earlier example) to make sure debug is turned off.

  • Clean up your code wherever possible. Make the naming consistent, reorder methods in some reasonable way, and try to improve readability. Even if you’re the next person to look at it, you won’t remember what you did six months from now.

  • Remove any test data that you included—particularly anything that’s private or proprietary (like your name and address in a Contacts database).

  • Delete any extraneous files from the project: old logfiles, source files that you no longer include in the application, etc.

5. Version Your Application

All applications submitted to Android Market must be versioned and named. You do that with simple statements in AndroidManifest.xml, as shown in the following segment of MJAndroid’s manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="" package="com.microjobsinc.mjandroid" android:versionCode="1" android:versionName="1.0">

Obviously you want the version numbering and naming to make sense. Android Market really only cares about the versionCode, which needs to be monotonically increasing for each release of your application, so a downloading device will know when to upgrade to new versions.

- iPhone Developer : Assembling Views and Animations - View Hierarchies
- iPhone Developer : Creating an “Online” GameKit Connection
- Java ME on Symbian OS : Handling Transitions Between Foreground and Background
- Java ME on Symbian OS : Handling JSR Fragmentation
- IPad : Using Popular and Critical Apps - Using Bento
- IPad : Using Popular and Critical Apps - Using iTap VNC
- BlackBerry Development : Pushing Data to Internal Users - Browser Push
- BlackBerry Application Data Push : How the Application Data Push Process Works
- Windows Phone 8 : Controls - Data Binding (part 4) - Control Templates
- Windows Phone 8 : Controls - Data Binding (part 3) - Data Binding Errors
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
Popular tags
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS