TUGAS MAKALAH SISTEM OPERASI ANDROID
NAMA NIM / KELAS MATA KULIAH DOSEN
: AYIK MARDIANSAH : 10108829/IF15/VI : SISTEM OPERASI : 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.
a. b. c. d. e. f. g. h. i.
Android
Features Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structured data storage Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent)
Page 2
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.
a.
Other Information 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.
Page 3
Android
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. 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.
c.
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 Android SDK installed as emulator, basic platform and environment android style, go to http://developer.android.com/sdk/index.html 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 Open Eclipse, Window Preferences. Configure Android path installation from folder android SDK downloaded earlier. https://dl-ssl.google.com/android/repository/repository.xml
b. c.
d.
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. 2. 3. 4. 5. 6. Customize ListView, Thread, Sync Method ProgressBar ImageLoader ListView, Simple HTTP Connection Menu, Create Dialog, Icon, Click Listener, get default R icon Simple TabWidget, get content URI list embed, admobView Simple Phone Sim Card Activity, Simple Database SQL Lite WebView, AutoCompleteTextView, CheckBoxView, GalleryView (Object View) Customize Database SQL Lite, RSS Parsing, Simple MusicPlayer SharedPreferences, Simple JSON, using API google
7. 8.
C. Advanced Level; (2 sessions) 1. 2. 3. 4. 5. 6. 7. 8. SMS, Receive SMS, EMAIL other Phone Activities Customize Database SQL Lite, SharedPreferences Access Device (Bluetooth, WIFI, GPS), VideoView Project Advanced MapActivities, GPS access Project Advanced, Mobile News RSS Reader Project Advanced, Translator Powered by Google Project Advanced, Twitter, Facebook API integrated 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
Android Page 8
3. Update SDK & AVD Manager (Window -> Android SDK and AVD Manager)
Picture 6: SDK Manager
Picture 7: Update SDK Manager 4. Create AVD Emulator
Android
Page 9
Picture 8: Create AVD B. Create The First App -> Helloworld
Android
Page 10
Picture 9: Create First Project C. Project Variable Input a. b. c. d. e. f. Project Name: HelloWorld Build Target: Android 2.1 Application Name: HelloWorld Package Name: im2.org.sample.main Create Activity: HelloActivity Min SDK Version: 7
Android
Page 11
Picture 10: Script HelloActivity D. Run As Android Application
Picture 11: Run Project in Emulator
Android
Page 12
Picture 12: Display Run Project in Emulator E. Project Structure
Picture 13: Project Structure
Android
Page 13
Project Name: HelloWorld Src Gen Asset Res->drawable Res->layout Res->string => Source Script => Auto-generate Id Unique Variable Local => Storage File (movie, sound etc) => Storage picture layout => XML layout => definition variable global
AndroidManifest.xml
F. AndroidManifest XML
Android
Page 14
Picture 14: AndroidManifest XML G. Uses-Permission AndroidManifest.xml Permission. http://developer.android.com/reference/android/Manifest.permission.h tml
Picture 15: Uses-Permission H. Res -> Layout
Picture 16: Layout Main.xml
Android Page 15
I. Res -> Drawable (lpi, mpi, hpi), gen R.java
Picture 17: Drawable R.java J. Src (Code Behind) HelloActivity.java
Android
Page 16
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
Android
Page 17
Picture 20: Create Layout login.xml
Android
Page 18
Picture 21: login.xml script
Picture 22: login.xml graphical layout
Android Page 19
Picture 23: main.xml script
Android
Page 20
Picture 24: main.xml graphical layout
Picture 23: HelloActivity (main.xml)
Android
Page 21
Picture 24: LoginActivity (1)
Android
Page 22
Picture 25: LoginActivity (2)
Android
Page 23
Picture 26: AndroidManifest.XML
Picture 27: Running HelloActivity
Android Page 24
Picture 28: Running LoginActivity
Guidance: http://developer.android.com/resources/tutorials/hello-world.html
Summary: 1. 2. 3. 4. 5. 6. Android Platform Description Installation GUI & Editor Create First Android App Structure Android Project Improvement First Android App Developer Guidance
Android
Page 25
Intermediate Android
X.
a.
Subject Material Create Installer apk (Android Package) 1. 2. b. create keystore signature APK installer export, upload, install (cmd shell, direclty)
ListView: 1. 2. simple list, thread/async progressbar, customize loading image, button refresh header/footer
c.
Menu: 1. 2. create menu, set icon, click listener help dialog, about dialog, get default R icon
d.
TabWidget: 1. 2. create simple tab, get content URI list embbed, admobs view (ads)
e.
Phone/SIM Card Activity: 1. 2. check SIM Card change, send SMS, receive SMS other info from your phone handset
f.
Simple Database SQL Lite 1. Simple Activity Database (List, Add, Delete Data)
Android
Page 26
XI.
a.
Create Installer apk (Android Package) From Project App Eclipse, right click:
Picture 1: Export Signed Application
Picture 2: Project Check
Android Page 27
Picture 3: Keystore Selection
Picture 4: Create a new keystore
Android Page 28
Picture 5: Key Creation
Picture 6: Destination and key checks
Android
Page 29
Picture 7: Save File apk
Picture 8: Running Emulator
Android
Page 30
Picture 9: Run Command Shell
Picture 10: Install apk command shell
Android
Page 31
XII. ListView
Create new project ( File -> New -> Android Project)
Picture 11: Create New Project ListMainApps
Android
Page 32
Picture 12: Structure Project
Picture 13: ListMainApps script
Android
Page 33
Picture 14: ListMainApps ArrayAdapter script
Picture 15: Running SecondApps Emulator
Android
Page 34
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 35
Picture 18: list_view.xml script
Picture 19: list_item.xml script
Android
Page 36
Picture 20: ListMainApps.java (1)
Picture 21: ListMainApps.java (2)
Android
Page 37
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 38
Picture 24: Create Folder Menu From res (2)
Picture 25: Create Folder menu.xml from menu folder
Android Page 39
Picture 27: script menu.xml
Picture 28: script ListMainApps (1)
Android
Page 40
Picture 29: script ListMainApps (2)
Picture 30: running ListMainApps
Android
Page 41
XIV. Create Simple TabWidget
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 42
Picture 33: AndroidManifest.xml
Picture 34: Running SecondApps
Android Page 43
XV. Simple Database SQL Lite
Create New Project, File -> New Android Project
Picture 35: New Project Database
Android
Page 44
Picture 36: DatabaseApps.java
Picture 37: New Class Customer Create two other classes, CustomerListAdapter.java, Utils.java
Android Page 45
Picture 38: Customer.java
Android Page 46
Picture 39: Create inputdata.xml Create two others xml layout, listview.xml, listitem.xml
Android Page 47
Picture 40: inputdata.xml, listitem.xml
Android
Page 48
Picture 41: listview.xml
Picture 42: CustomerListAdapater(1)
Android
Page 49
Picture 43: CustomerListAdapater(2)
Android Page 50
Picture 42: CustomerSQLHelper
Android Page 51
Picture 43: Util.java (1)
Android Page 52
Picture 44: Util.java (2) DatabaseApps.java
Android
Page 53
Android
Page 54
Android
Page 55
Android
Page 56
Picture 45: DatabaseApps.java
Picture 46: AndroidManifest.XML
Android Page 57
Picture 47: Running DatabaseApps
http://developer.android.com/
Android Page 58
REFERENSI
http://developer.android.com/ http://developer.android.com/resources/tutorials/hello-world.html
Android
Page 59