Вы находитесь на странице: 1из 40

Pengenalan Android Programming

Oleh: Indra

Biodata:
Email: indrasela@gmail.com,indra@budiluhur.ac.id Ym,tw,fb : indrasela@yahoo.com Indrasela.blogsome.com

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.

best mobile platform application powered by Google http://developer.android.com/

features
1. Application framework enabling reuse and replacement of components 2. Dalvik virtual machine optimized for mobile devices 3. Integrated browser based on the open source WebKit engine 4. Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) 5. SQLite for structured data storage 6. Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) 7. GSM Telephony (hardware dependent) 8. Bluetooth, EDGE, 3G, and WiFi (hardware dependent) 9. Camera, GPS, compass, and accelerometer (hardware dependent) 10. Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

system architecture

others information
1. 2. 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. 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. Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.

3.

4.

Requirement(1)
1. Eclipse installed as GUI editor android platform, go to http://www.eclipse.org/downloads/, Eclipse Classic, GanyMede Packages, Eclipse Classic 3.4.2 2. Android SDK installed as emulator, basic platform and environment android style, go to http://developer.android.com/sdk/index.html 3. Eclipse Update Manager install plugins for Android Development Tools (ADT) go to link https://dlssl.google.com/android/eclipse/, Eclipse Help Software Updates, Available Software Tab, Add Site 4. Open Eclipse, Window Preferences. Configure Android path installation from folder android SDK downloaded earlier. https://dlssl.google.com/android/repository/repository.xml

Tahapan Instalasi
Extract Eclipse di C:/Android Extract Android SDK di C:/Android Extract ADT-10.0.1 Copy Hasil Exctract ADT ke dalam Folder Eclipse Add Android SDK ke dalam Eclipse Menu Windows >> Preferences > Android > Browse

Life cycles application

getting started with android (2)


Picture Item 3 guidance

getting started with android (3)


Picture Item 3 guidance

getting started with android (4)


Picture Item 4 guidance

getting started with android (5)


Picture Item 4 guidance

getting started with android (6)


Install virtual devices

Create basic application (1)

Create basic application (2)


1. 2. 3. 4. 5. 6. Project Name: HelloWorld Build Target: Android 2.2 Application Name: HelloWorld Package Name: im2.org.sample.main Create Activity: HelloActivity Min SDK Version: 8

Create basic application (3)


run application by emulator

Create basic application (4)


on emulator

Structure Android Project (1)


Project Name: HelloWorld

Src => Source Script Gen => Autogenerate Id Variable Local Asset => Storage File (movie, sound etc) Res->drawable => Storage picture layout Res->layout => XML layout Res->string => definition variable global AndroidManifest.xml

Structure Android Project (2)


AndroidManifest.xml

Structure Android Project (3)


AndroidManifest.xml

Structure Android Project (4)


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

Structure Android Project (5)


Layout -> main.xml

Structure Android Project (6)


Res->Drawable, gen-> R.java

Structure Android Project (7)


Src-> HelloActivity

Next Sample HelloWorld


Create layout login.xml

Next Sample HelloWorld


Create layout login.xml

Next Sample HelloWorld


login.xml

Lanjutan (login.xml)

Next Sample HelloWorld


login.xml

Next Sample HelloWorld


Main.xml

Next Sample HelloWorld


Main.xml

Next Sample HelloWorld


Create class LoginActivity.java, File-> New->Class

Next Sample HelloWorld


class LoginActivity.java (2)

Next Sample HelloWorld


Running by emulator

Next Sample HelloWorld


HelloActivity.java

Next Sample HelloWorld


AndroidManifest.xml

Next Sample HelloWorld


Running by emulator

Exercise Beginner I
1. Create Simple Project App

Summary Beginner 1
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

http://developer.android.com/

Вам также может понравиться