Sei sulla pagina 1di 42

Mobile App Development

Lecturer: Sok Piseth


Email: sokpiseth777@gmail.com
Phone: 0969102728

1
Objective
To understand the Android building
blocks and learn to develop Android
applications.

2
Android Market
Android devices come in all shapes
and sizes. As of late November
2010, the Android OS can be seen
powering
the following types of devices:
Smartphones
Tablets
E-reader devices
Netbooks
MP4 players
Internet TVs
3
Android Architecture

4
Android version
1. Alpha (1.0) 2008
2. Beta (1.1) 2009
3. Cupcake (1.5) 2009
4. Donut (1.6) 2009
5. Eclair (2.02.1) 2009
6. Froyo (2.22.2.3) 2010
7. Gingerbread (2.32.3.7) 2010
8. Honeycomb (3.03.2.6) 2011
9. Ice Cream Sandwich (4.04.0.4) 2011
10. Jelly Bean (4.14.3.1) 2012
11. KitKat (4.44.4.4) 2013
12. Lollipop (5.05.1.1) 2014
13. Marshmallow (6.06.0.1) 2015
5 14. Nougat (7.0 7.1.1) 2016
System Requirements

6
Tools to Develop Android
JDK: (java development kit) 1.8
Android Studio 2.1: to write code and design UI
Android SDK include AVD (Android Virtual Device): to
test the applications

7
Current tool to develop android app

8
Update your Android SDK

9 Run the SDK Manager


Update your Android SDK

10
Create the AVD
1. Tool -> Android -> ADV Manager
2. Click new

11
Create the AVD
Click Create Virtual Device

12
Create the AVD
Select your hardware (eg. Nexus 4)

13
Create the AVD
Select system image (android version)

14
Create the AVD
Verify before create AVD then click finish button

15
Run the AVD
Select one of the created AVD and click start. This will run the AVD
where your App will be run on. (It will take a while for the AVD to
load.).

16
Essential Tool in Android Studio
Settings (change Android SDK path)

17
Essential Tool in Android Studio
SDK and AVD manager

18
Essential Tool in Android Studio
Android Preview Panel

19
Essential Tool in Android Studio
View line number and white space in code

20
Essential Tool in Android Studio
Run Android App

21
First Android App: Hello Android
Add App Name

22
Select
Target
Version
eg.
Android
5.0

23
Select Your
First
Activity
Eg. Blank
Activity

24
Name your Activity
(java class) and
Layout (user
interface)

25
You are done!

26
Run your First App
Run the app from Android Studio
1. In Android Studio, select your project and click
Run from the toolbar.
2. In the Choose Device window, click the Launch
emulator radio button.
3. From the Android virtual device pull-down
menu, select the emulator you created, and
click OK.

27
Select your AVD to Run

28
Result

29
Assignment 1

Implement the Hello android application:


1. Create and run an AVD
2. Create new android project
3. Configure the android project to run with the AVD
4. Test run the project

30
Android View

Components of
the application

Graphics

Variables
values

31
Android Resources

32
Android Resources
1. Main Project
This would be entire project context. Whatever
you do in IntelliJ IDEA, you do that in the context
of a project. A project is an organizational unit that
represents a complete software solution.
2. .idea
Eclipse uses project.properties file for project
specific metadata. Here in android studio, this
.idea does the same thing. This means the project
specific metadata is stored by Android Studio.

33
Android Resources
3. Project Module (app)
This is the actual project folder where your
application code resides. The application folder has
following sub directories
4. gradle
This is where the gradle build systems jar wrapper
i.e. this jar is how AS communicates with gradle
installed in Windows (the OS in my case).
5. External Libraries
This is not actually a folder but a place where
Referenced Libraries and information on targeted
platform SDK is shown.
34
Layout (activity_main.xml) - UI

35
Layout (activity_main.xml) - UI

36
MainActivity.java

37
App Sold on Google Play Store

Paid applications are available in 129 countries


App: 450,000 titles available as of March 2012.
Android Devices
Samsung
Sony
HTC
Motorola
LG
Info about it
Android Market -> Google Play Store. Because
Google recently mixed Google Market and
Google Music into Play Store too.
Get more details on
http://developer.android.com/distribute/index.h
tml
How to Sell your App
1. Need a Google Account. It is Free!
2. Go to https://play.google.com/apps/publish/
3. Enter your developer information
4. Most importantly, pay $25 for registration fee by
credit card (using Google Checkout). One time
only.
5. If you don't have Google Checkout Account, sign
for it. www.checkout.google.com
6. Transaction fee is 30%. Developer gets 70% of the
payment.
Isn't it a very good deal? Why wait?
Thanks

42

Potrebbero piacerti anche