Mobile Application
Development
Android Application Development
Lecture 17
Outline
Chapter 12: Publishing Android
Applications
Preparing for Publishing
Deploying APK Files
1
2
Publishing Android Applications
Objectives
How to prepare your application for
deployment
Exporting your application as an APK file and
signing it with a new certificate
How to distribute your Android application
Publishing your application on the Android
Market
Publishing Steps
The steps to publishing your Android
application:
1. Export your application as an APK
(Android Package) file.
2. Generate your own self-signed certificate
and digitally sign your application with it.
3. Deploy the signed application.
4. Use the Android Market for hosting and
selling your application.
Versioning Your Application
Application Attributes
If you are planning to publish your application on the
Android Market, the [Link] file must have
the following attributes:
android:versionCode (within the <manifest> element)
android:versionName (within the <manifest> element)
android:icon (within the <application> element)
android:label (within the <application> element)
Digital Signing
All Android applications must be digitally
signed before they are allowed to be deployed
onto a device.
Eclipse uses a default debug keystore
(appropriately named [Link]) to
sign your application.
A keystore is commonly known as a digital
certificate.
Keystore
Exporting and Signing an
Android Application Step 1
Select the LBSproject in Eclipse and then
select File Export
Exporting and Signing an
Android Application Step 2
In the Export dialog,
expand the Android
item and select Export
Android Application.
Click Next.
Exporting and Signing an
Android Application Step 3
The LBS project should
now be displayed.
Click Next.
Exporting and Signing an
Android Application Step 4
Select the Create new
keystore option to
create a new certificate
(keystore) for signing
your application.
Enter a path to save
your new keystore and
then enter a password
to protect the keystore.
Click Next.
Exporting and Signing an
Android Application Step 5
Provide an alias for the private key
and enter a password to protect the
private key.
According to Google, your application
must be signed with a cryptographic
private key whose validity period
ends after 22 October 2033.
Hence, enter a number that is
greater than 2033 minus the current
year.
Finally, enter your name in the field
labeled First and Last Name.
Click Next.
Exporting and Signing an
Android Application Step 6
Enter a path to store
the destination APK file.
Click Finish.
The APK file will now be
generated.
Exporting and Signing an
Android Application Step 7
Deploy the [Link] MD5 fingerprint.
Exporting and Signing an
Android Application Step 8
Using the MD5 fi ngerprint obtained from the
previous step, go to
http://
[Link]/android/add-ons/google-apis
/[Link]
and sign up for a new Maps API key.
Exporting and Signing an
Android Application Step 9
Enter the new Maps API key in the [Link] file:
Exporting and Signing an
Android Application Step 10
With the new Maps API key
entered in the [Link] file,
you now need to export the
application once more and
resign it.
Repeat steps 2 through 4.
When you are asked to select a
keystore, select the Use
existing keystore option (and
enter the password you used
earlier to protect your keystore.
Click Next.
Exporting and Signing an
Android Application Step 11
Select the Use
existing key option
and enter the
password you set
earlier to secure the
private key (enter the
password).
Click Next.
Exporting and Signing an
Android Application Step 12
Click Finish to generate
the APK file again.
Exporting and Signing an
Android Application
Thats it!
The APK is now generated and contains the
new Map API key that is tied to the new
keystore.
Deploying APK Files
After you have signed your APK files, you need a
way to get them onto your users devices. Three
methods can be used:
Deploying manually using the [Link] tool.
Hosting the application on a web server.
Publishing through the Android Market.
Publishing on the Android
Market
To publish your application two steps should be
done:
Creating a Developer Profile
Submitting Your Apps
Creating a Developer Profile
Submitting Your Apps
Questions?