0% found this document useful (0 votes)
43 views27 pages

Android Dev Lecture17

This document discusses the steps for publishing an Android application. It covers preparing the application by exporting it as a signed APK file, obtaining a Maps API key tied to the new keystore, and deploying the APK. The main deployment methods are manually using adb.exe, hosting on a web server, or publishing to the Android Market which requires creating a developer profile and submitting the app.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views27 pages

Android Dev Lecture17

This document discusses the steps for publishing an Android application. It covers preparing the application by exporting it as a signed APK file, obtaining a Maps API key tied to the new keystore, and deploying the APK. The main deployment methods are manually using adb.exe, hosting on a web server, or publishing to the Android Market which requires creating a developer profile and submitting the app.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

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 AndroidManifest.xml 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 debug.keystore) 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 debug.keystores MD5 fingerprint.

Exporting and Signing an


Android Application Step 8
Using the MD5 fi ngerprint obtained from the
previous step, go to
http://
code.google.com/android/add-ons/google-apis
/maps-api-signup.html
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 main.xml file:

Exporting and Signing an


Android Application Step 10
With the new Maps API key
entered in the main.xml 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 adb.exe 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?

You might also like