Transcript

TUGAS MAKALAH SISTEM OPERASI

ANDROID

NAMA : AYIK MARDIANSAH

NIM / KELAS : 10108829/IF15/VI

MATA KULIAH : SISTEM OPERASI

DOSEN : YULIYANI, S. KOM

JURUSAN TEKNIK INFORMATIKA

FAKULTAS TEKNIK DAN ILMU KOMPUTER

UNIVERSITAS KOMPUTER INDONESIA

Android Page 1

I. What is Android

Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language, since 2008. Now android is the best mobile platform application powered by Google, http:

//developer.android.com/.

II. Features

a. Application framework enabling reuse and replacement of components

b. Dalvik virtual machine optimized for mobile devices

c. Integrated browser based on the open source WebKit engine

d. Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)

e. SQLite for structured data storage

f. Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)

g. GSM Telephony (hardware dependent)

h. Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

Android Page 2

i. Camera, GPS, compass, and accelerometer (hardware dependent)

j. Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

III. System Architecture

Picture 1: System Architecture

IV. Other Information

Android Page 3

a. Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.

b. By providing an open development platform, Android offers developers the ability to build extremely rich and innovative applications. Developers are free to take advantage of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much, much more.

c. Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries such as system C library, Media library, 3D library etc.

V. Getting Started with Android

a. Eclipse installed as GUI editor android platform, go to http://www.eclipse.org/downloads/, Eclipse Classic, GanyMede Packages, Eclipse Classic 3.4.2 / Galileo 3.5

b. Android SDK installed as emulator, basic platform and environment android style, go to http://developer.android.com/sdk/index.html

c. Eclipse Update Manager install plugins for Android Development Tools (ADT) go to link https://dl-ssl.google.com/android/eclipse/, Eclipse – Help – Software Updates, Available Software Tab, Add Site

d. Open Eclipse, Window – Preferences. Configure Android path installation from folder android SDK downloaded earlier.

https://dl-ssl.google.com/android/repository/repository.xml

VI. Life Cycles Android

Android Page 4

Picture 2: Life Cycles

VII. Subject Material Android Training Session

A. Beginner Level; (2 sessions)

1. What is Android

2. Features, System Architecture, Life Cycle Application

3. Getting Started, Requirement Development (ECLIPSE, AVD, ADT, SDK)

4. Create First App (HelloWorld), File Project Structure

5. Create *.apk Installer File Project, Install (command shell)

6. Simple ListView (Object Android XML), Simple Activity, Intent

Android Page 5

B. Intermediate Level; (3 sessions)

1. Customize ListView, Thread, Sync Method – ProgressBar

2. ImageLoader ListView, Simple HTTP Connection

3. Menu, Create Dialog, Icon, Click Listener, get default R icon

4. Simple TabWidget, get content URI list embed, admobView

5. Simple Phone Sim Card Activity, Simple Database SQL Lite

6. WebView, AutoCompleteTextView, CheckBoxView, GalleryView (Object View)

7. Customize Database SQL Lite, RSS Parsing, Simple MusicPlayer

8. SharedPreferences, Simple JSON, using API google

C. Advanced Level; (2 sessions)

1. SMS, Receive SMS, EMAIL other Phone Activities

2. Customize Database SQL Lite, SharedPreferences

3. Access Device (Bluetooth, WIFI, GPS), VideoView

4. Project Advanced MapActivities, GPS access

5. Project Advanced, Mobile News RSS Reader

6. Project Advanced, Translator Powered by Google

7. Project Advanced, Twitter, Facebook API integrated

8. Project Advanced Membership – Client Server Side, Transaction Case

Android Page 6

VIII. First Application (Eclipse GUI opened)

A. Update Environment Site SDK, plug-in ADT (Android Developer Tool)

1. Update Site plug-in ADT (Help -> Software Updates)

Picture 3: Update ADT

Android Page 7

Picture 4: Install - Update ADT

2. Update SDK & AVD Manager (Window -> Preferences)

Picture 5: Install SDK

3. Update SDK & AVD Manager (Window -> Android SDK and AVD Manager)

Picture 6: SDK Manager

Android Page 8

Picture 7: Update SDK Manager

4. Create AVD Emulator

Android Page 9

Picture 8: Create AVD

B. Create The First App -> Helloworld

Picture 9: Create First Project

C. Project Variable Input

a. Project Name: HelloWorld

b. Build Target: Android 2.1

c. Application Name: HelloWorld

d. Package Name: im2.org.sample.main

e. Create Activity: HelloActivity

f. Min SDK Version: 7

Android Page 10

Picture 10: Script HelloActivity

D. Run As Android Application

Picture 11: Run Project in Emulator

Android Page 11

Picture 12: Display Run Project in Emulator

E. Project Structure

Picture 13: Project Structure

Android Page 12

Project Name: HelloWorld

Src => Source Script

Gen => Auto-generate Id Unique Variable Local

Asset => Storage File (movie, sound etc)

Res->drawable => Storage picture layout

Res->layout => XML layout

Res->string => definition variable global

AndroidManifest.xml

F. AndroidManifest XML

Android Page 13

Picture 14: AndroidManifest XML

G. Uses-Permission

AndroidManifest.xml – Permission. http://developer.android.com/reference/android/Manifest.permission.html

Picture 15: Uses-Permission

H. Res -> Layout

Picture 16: Layout Main.xml

Android Page 14

I. Res -> Drawable (lpi, mpi, hpi), gen R.java

Picture 17: Drawable – R.java

J. Src (Code Behind) – HelloActivity.java

Android Page 15

Picture 18: HelloActivity.java

IX. Next First Project (Two Activities Combined)

a. Create layout login.xml (right click in folder res-layout)

Picture 19: Create Layout

Picture 20: Create Layout login.xml

Android Page 16

Picture 21: login.xml script

Picture 22: login.xml graphical layout

Android Page 17

Picture 23: main.xml script

Android Page 18

Picture 24: main.xml graphical layout

Picture 23: HelloActivity (main.xml)

Android Page 19

Picture 24: LoginActivity (1)

Android Page 20

Picture 25: LoginActivity (2)

Android Page 21

Picture 26: AndroidManifest.XML

Picture 27: Running HelloActivity

Android Page 22

Picture 28: Running LoginActivity

Guidance:

http://developer.android.com/resources/tutorials/hello-world.html

Summary:

1. Android Platform Description

2. Installation GUI & Editor

3. Create First Android App

4. Structure Android Project

5. Improvement First Android App

6. Developer Guidance

Android Page 23

Intermediate Android

X. Subject Material

a. Create Installer apk (Android Package)

1. create keystore signature APK installer

2. export, upload, install (cmd shell, direclty)

b. ListView:

1. simple list, thread/async progressbar, customize

2. loading image, button refresh header/footer

c. Menu:

1. create menu, set icon, click listener

2. help dialog, about dialog, get default R icon

d. TabWidget:

1. create simple tab, get content URI

2. list embbed, admobs view (ads)

e. Phone/SIM Card Activity:

1. check SIM Card change, send SMS, receive SMS

2. other info from your phone handset

f. Simple Database SQL Lite

1. Simple Activity Database (List, Add, Delete Data)

XI. Create Installer apk (Android Package)

a. From Project App Eclipse, right click:

Android Page 24

Picture 1: Export Signed Application

Picture 2: Project Check

Android Page 25

Picture 3: Keystore Selection

Picture 4: Create a new keystore

Android Page 26

Picture 5: Key Creation

Picture 6: Destination and key checks

Android Page 27

Picture 7: Save File apk

Picture 8: Running Emulator

Android Page 28

Picture 9: Run Command Shell

Picture 10: Install apk command shell

XII. ListView

Android Page 29

Create new project ( File -> New -> Android Project)

Picture 11: Create New Project ListMainApps

Android Page 30

Picture 12: Structure Project

Picture 13: ListMainApps script

Android Page 31

Picture 14: ListMainApps ArrayAdapter script

Picture 15: Running SecondApps Emulator

Android Page 32

Create Layout XML, right click folder res->layout, create new Android XML

Picture 16: Create Android XML layout

Picture 17: list_view.xml

Create one more layout android XML, list_item.xml

Android Page 33

Picture 18: list_view.xml script

Picture 19: list_item.xml script

Android Page 34

Picture 20: ListMainApps.java (1)

Picture 21: ListMainApps.java (2)

Android Page 35

Picture 22: Running ListMainApps.java

XIII. Create Menu, Set Icon Listener, Get Default R icon

Picture 23: Create Folder Menu From res (1)

Android Page 36

Picture 24: Create Folder Menu From res (2)

Picture 25: Create Folder menu.xml from menu folder

Android Page 37

Picture 27: script menu.xml

Picture 28: script ListMainApps (1)

Android Page 38

Picture 29: script ListMainApps (2)

Picture 30: running ListMainApps

XIV. Create Simple TabWidget

Android Page 39

Create New Class Activity Name: TabActivity.java, right click on package HelloWorld project, New => Class

Picture 31: TabAcitivity

Create New layout XML, right click on res->layout folder, New => Android XML, name: main_tab.xml

Picture 32: main_tab.xml

Android Page 40

Picture 33: AndroidManifest.xml

Picture 34: Running SecondApps

Android Page 41

XV. Simple Database SQL Lite

Create New Project, File -> New Android Project

Picture 35: New Project Database

Android Page 42

Picture 36: DatabaseApps.java

Picture 37: New Class Customer

Create two other classes, CustomerListAdapter.java, Utils.java

Android Page 43

Picture 38: Customer.java

Android Page 44

Picture 39: Create inputdata.xml

Create two others xml layout, listview.xml, listitem.xml

Android Page 45

Picture 40: inputdata.xml, listitem.xml

Android Page 46

Picture 41: listview.xml

Picture 42: CustomerListAdapater(1)

Android Page 47

Picture 43: CustomerListAdapater(2)

Android Page 48

Picture 42: CustomerSQLHelper

Android Page 49

Picture 43: Util.java (1)

Android Page 50

Picture 44: Util.java (2)

DatabaseApps.java

Android Page 51

Android Page 52

Android Page 53

Android Page 54

Picture 45: DatabaseApps.java

Picture 46: AndroidManifest.XML

Android Page 55

Picture 47: Running DatabaseApps

http://developer.android.com/

Android Page 56

REFERENSI

http://developer.android.com/

http://developer.android.com/resources/tutorials/hello-world.html

Android Page 57

top related