11.GoingtoMarket

advertisement
Mobile Computing
Going to Market
1
Copyright 2014 by Janson Industries
Objectives
▀
Learn about:
 Preparing
 Signing
 How
the app for market
and digital certificates
to export the signed app
 Signing
up as a Google developer
 Publishing
the app to the Android
marketplace
2
Copyright 2014 by Janson Industries
Going To Market
▀
Apps have to be
 Versioned
 Signed
 Packaged
▀
into an .apk file
To version, make sure the following text
android:versionCode=”1” android:versionName=”1.0”
▀
Is in the manifest tag as follows
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.first.pkg" android:versionCode="1" android:versionName="1.0" >
3
Copyright 2014 by Janson Industries
Going To Market
▀
▀
▀
This says its version 1
If we change the app and specify a new
version, the device will automatically
replace the old version, when the new
version is loaded
Also need a uses-sdk tag to identify the
minimum SDK Version required to run
app
 Eclipse
should have put it there already
<uses-sdk android:minSdkVersion="13" />
Copyright 2014 by Janson Industries
4
Going To Market
▀
▀
Right now
the app icon
is the
standard
Android
robot
If you want
a different
icon
5
Copyright 2014 by Janson Industries
Going To Market
▀
▀
▀
Copy a png icon file into all the
drawable folders (icon.png)
In the application start tag change
icon from ic_launcher to icon
http://www.iconarchive.com/ has
many available for non-commercial
usage
6
Copyright 2014 by Janson Industries
Going To Market
7
Copyright 2014 by Janson Industries
Going To Market
8
Copyright 2014 by Janson Industries
Going To Market
▀
▀
▀
▀
Copyright 2014 by Janson Industries
An app is signed with a digital
certificate
A digital certificate (DC) has
A
signature
A
private/public key pair
And is stored in a keystore
A keystore has a list of DCs, each
with a alias
9
Signing an App
▀
Need three things
A
keystore with a DC
 An .apk for the app
 The jarsigner utility
► The
Android plug-in has been taking
care of this when using the emulator
▀
Need to
 Generate
the DC
 Sign the .apk file
 Align app memory for efficiency
10
Copyright 2014 by Janson Industries
Signing an App
▀
▀
Create a folder (KeystoreFolder) to hold
keystore
From command prompt run the keytool
utility with following command:
 Make
sure the path is pointing to jdk/bin
keytool -genkey -v -keystore K:\Mobile\KeystoreFolder\MyFirstProject.keystore alias MFP -storepass jeter123 -keypass jeter123 -keyalg RSA -validity 15000
 -genkey
is the generate key command
 -v makes output visible to creator
 -keystore ids keystore name & location
11
Copyright 2014 by Janson Industries
C:\Program Files\Java\jdk\bin
12
Copyright 2014 by Janson Industries
Signing an App
keytool -genkey -v -keystore K:\Mobile\KeystoreFolder\MyFirstProject.keystore
-alias MFP -storepass jeter123 -keypass jeter123 -keyalg RSA –keysize 2048
-validity 15000
 -alias
ids keystore nickname
 -storepass ids keystore password
 -keypass ids password to access the
key
 -keyalg ids encryption algorithm to use
(RSA or DSA)
 -keysize number of bits (2048 rec min)
 -validity number of days key is valid
(10000 rec min)
13
Copyright 2014 by Janson Industries
Signing an App
▀
After issuing the command will be
prompted for info
 First
and last names
 Organizational
 Organization
 City,
unit
name
State and Country code
14
Copyright 2014 by Janson Industries
Enter same password as specified in the command then data
Doh! Fortunately will prompt if info is correct
15
Copyright 2014 by Janson Industries
That’s better
16
Copyright 2014 by Janson Industries
Hit Enter, Keystore and DC generated
17
Copyright 2014 by Janson Industries
Hit Enter, Keystore and DC generated
18
Copyright 2014 by Janson Industries
Signing an App
▀
▀
Next we need to export a
signed .apk
In the Package Explorer
 Right
click MyFirstProject
 Click
Android Tools
 Click
Export Signed
Application Package
▀
Click the Next button
19
Copyright 2014 by Janson Industries
Signing an App
Enter location of the keystore and the keystore password
20
Copyright 2014 by Janson Industries
Signing an App
Select the alias and enter the key password
21
Copyright 2014 by Janson Industries
Signing an App
Specify where to export to (notice 15000 days is over 40 years)
22
Copyright 2014 by Janson Industries
Signing an App
▀
Next we need sign up as a Google developer at:
 https://play.google.com/apps/publish/signup
► Need
a Google account to be a developer!
23
Copyright 2014 by Janson Industries
Scroll down and click continue
(This has probably changed since I did it – I didn't want to spend
another $25!)
24
Copyright 2014 by Janson Industries
Accept the agreement and Continue
25
Copyright 2014 by Janson Industries
Costs $25 to sign up as Developer, click Continue
26
Copyright 2014 by Janson Industries
Sign into your Google account
27
Copyright 2014 by Janson Industries
Fill in your payment info and click Agree and Continue
28
Copyright 2014 by Janson Industries
Choose you privacy/contact settings and place the order
29
Copyright 2014 by Janson Industries
30
Copyright 2014 by Janson Industries
Took a day before I could upload
31
Copyright 2014 by Janson Industries
32
Copyright 2014 by Janson Industries
Specify title of app, click Upload APK
33
Copyright 2014 by Janson Industries
Specify the .apk file and its location, click Upload
34
Copyright 2014 by Janson Industries
Specify the .apk file and its location, click Upload
Drag and drop the apk file (or browse to it)
35
Copyright 2014 by Janson Industries
Need to add all these thing to the app definition
36
Copyright 2014 by Janson Industries
Click and select store listing
37
Copyright 2014 by Janson Industries
Specify info about the app as well as screen snap shots, hi-res app
icon, promotional links, videos, privacy policy, pricing, etc.
38
Copyright 2014 by Janson Industries
Must have at least two screen shots
39
Copyright 2014 by Janson Industries
Must have a high resolution icon (can search for these)
40
Copyright 2014 by Janson Industries
Must have category and contact info and privacy policy then Save
41
Copyright 2014 by Janson Industries
Click and select pricing and distribution then decide paid/free and
countries
To sell must set up a merchant account. Google takes 30%.
42
Copyright 2014 by Janson Industries
Consents then Save
43
Copyright 2014 by Janson Industries
Status changed, click drop down arrow and select Publish this app
44
Copyright 2014 by Janson Industries
If you forgot something, it will let you know
45
Copyright 2014 by Janson Industries
If you just paid you will have to settle for saving for now and later go
back and publish
46
Copyright 2014 by Janson Industries
47
Copyright 2014 by Janson Industries
Downloading and Installing an App
▀
Need to wait for Google to process
the “app publish” for app to show up
in a search
A
▀
couple hours worked for me
To search for an app, go to:
 https://play.google.com/store/apps
 Enter
the search criteria
48
Copyright 2014 by Janson Industries
Specify search text, click on price to display more info and install
49
Copyright 2014 by Janson Industries
Click install
50
Copyright 2014 by Janson Industries
It may ask you to sign in (if phone has info on it, will just read info
and you will not have to type in)
51
Copyright 2014 by Janson Industries
Click install again
52
Copyright 2014 by Janson Industries
Will be installed soon
53
Copyright 2014 by Janson Industries
When installed status will change to Installed
54
Copyright 2014 by Janson Industries
AdProj will appear in the list of apps
55
Copyright 2014 by Janson Industries
Download