android programming concept bl

40
Pengenalan Android Programming Oleh: Indra

Upload: ardy-prologic

Post on 28-Apr-2015

27 views

Category:

Documents


2 download

TRANSCRIPT

Pengenalan Android Programming

Oleh: Indra

Biodata:

• Email: [email protected],[email protected]

• Ym,tw,fb : [email protected]• 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 applicationpowered by Googlehttp://developer.android.com/

features1. Application framework enabling reuse and replacement of

components2. Dalvik virtual machine optimized for mobile devices3. Integrated browser based on the open source WebKit engine4. 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 storage6. 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. 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.

2. 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.

3. 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.

4. 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.

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://dl-ssl.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://dl-ssl.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. Project Name: HelloWorld2. Build Target: Android 2.23. Application Name: HelloWorld4. Package Name: im2.org.sample.main5. Create Activity: HelloActivity6. 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 ScriptGen=> Autogenerate Id Variable LocalAsset => Storage File (movie, sound etc)

Res->drawable => Storage picture layoutRes->layout => XML layoutRes->string => definition variable globalAndroidManifest.xml

Structure Android Project (2)

AndroidManifest.xml

Structure Android Project (3)

AndroidManifest.xml

Structure Android Project (4)

AndroidManifest.xml – Permissionhttp://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. Android Platform Description2. Installation GUI & Editor3. Create First Android App4. Structure Android Project5. Improvement First Android App6. Developer Guidance

http://developer.android.com/