Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Mengenal Android
ANDROID
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Android merupakan sekumpulan software untuk perangkat bergerak (mobile device) yang di dalamnya, terdapat: sistem operasi, middleware, key applications
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Oktober 2008, Google membuat kode program dari platform Android tersedia di bawah Apaches open source license
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
HTC Dream G1
Phones
Suno S880
Samsung Galaxy
Sony Ericsson
Phones
Tablets
Gome FlyTouch
Acer beTouch
Dawa D7
Tablets
Android Watch
Android-Powered Microwave
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Versi ANDROID
Android Releases
Versi ANDROID
2009 SDK 1.5 (Cupcake) + New soft keyboard with autocomplete feature SDK 1.6 (Donut) + Support Wide VGA SDK 2.0/2.0.1/2.1 (Eclair) + Revamped UI, browser 2010 SDK 2.2 (Froyo) + Flash support, tethering SDK 2.3 (Gingerbread) + UI update, system-wide copy-paste Gingerbread
Android 2.3.+
Versi ANDROID
2011 SDK 3.0/3.1/3.2 (Honeycomb) for tablets only + New UI for tablets, support multi-core processors SDK 4.0/4.0.1/4.0.2/4.0.3 (Ice Cream Sandwich) + Changes to the UI, Voice input, NFC 2012 SDK 4.1 (Jelly Bean)
Honeycomb
Android 3.0-3.2
Versi ANDROID
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Arsitektur Android
Arsitektur Android
Providing an abstraction layer between the hardware and the rest of the software stack
Arsitektur Android
Including a set of C/C++ libraries used by components of the Android system Exposed to developers through the Android application framework
Arsitektur Android
Core Libraries Providing most of the functionality available in the core libraries of the Java language APIs Data Structures Utilities File Access Network Access Graphics ...
Arsitektur Android
Dalvik Virtual Machine Providing environment on which every Android application runs Each Android application runs in its own process, with its own instance of the Dalvik VM. Dalvik has been written such that a device can run multiple VMs efficiently. Register-based virtual machine
Arsitektur Android
Enabling and simplifying the reuse of components Developers have full access to the same framework APIs used by the core applications. Users are allowed to replace components.
Arsitektur Android
Feature View System Content Provider Resource Manager Role Used to build an application, including lists, grids, text boxes, buttons, and embedded web browser Enabling applications to access data from other applications or to share their own data Providing access to non-code resources (localized strings, graphics, and layout files)
Notificatio Enabling all applications to display customer alerts in the n Manager status bar Activity Manager Managing the lifecycle of applications and providing a common navigation backstack
Arsitektur Android
Activities
application presentation layer invisible components, update data sources, visible activities, trigger notifications perform regular processing even when app is not active or invisible shareable data store message passing framework broadcase messages system wide, for an action to be performed consume intent broadcasts lets app listen for intents matching a specific criteria like location Toast notification Status Bar Notification Dialog notification
Services
Arsitektur Android
Android provides a set of core applications: Email Client SMS Program Calendar Maps Browser Contacts ... All applications are written using the Java language.
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
Aplikasi Android
Suatu aplikasi yang berjalan di atas perangkat bergerak dengan platform Android Jenis Aplikasi Web : berjalan di dalam sebuah web browser HTML5, JavaScript, Flash Native: dalam bentuk binaries yang diinstal ke perangkat bergerak Java ME, C/C++
Truly open, free development platform Linux based Component-based architecture Reusable, replaceable modules Multi-layer isolation of programs Many services included High quality graphics and sound Portability across hardware Java programs executed by Davlik virtual machine ARM, x86 and other Support by multiple large organizations
Topik
1. 2. 3. 4. 5. 6. 7. Apakah ANDROID itu? Asal mula ANDROID Perangkat yang menggunakan ANDROID Versi ANDROID Arsitektur ANDROID Aplikasi di ANDROID Membangun aplikasi ANDROID
www.android-x86.org
www.android-indonesia.com
http://beta.appinventor.mit.edu
http://developer.android.com
www.xda-developers.com
SOFTWARE DEVELOPMENT
Design
Cd g o in
Testing
No
Yes Design Error? Yes Errors?
No
Release Process
Android Apps
Built using Java and new SDK libraries No support for some Java libraries like Swing & AWT Oracle currently suing Google over use Java code compiled into Dalvik byte code (.dex) Optimized for mobile devices (better memory management, battery utilization, etc.) Dalvik VM runs .dex files
ADB is a client server program that connects clients on developer machine to devices/emulators to facilitate development. An IDE like Eclipse handles this entire process for you.
http://play.google.com
RELEASE PROCESS
Perform Build Release Candidate Thoroughly Test Build
Fix Bugs!
yes
Bugs?
IMPLEMENTATION
Cheap: Install the tools Java, Eclipse, Android SDK Your computer: Windows, Linux, Mac Phone emulator included Easy: Create your first program Android Development Toolkit (ADT) Plugin for Eclipse, written by Google Examples and tutorials available Run on the Emulator Verify by USB connecting a phone to computer Rewarding: Prepare to publish eg. Google Market
Activities
Typically correspond to one UI screen But, they can: Be faceless Be in a floating window Return a value
Intent Receivers
Components that respond to broadcast Intents Way to respond to external notification or alarms Apps can invent and broadcast their own Intent
Intents
Think of Intents as a verb and object; a description of what you want done E.g.: VIEW, CALL, PLAY, etc.. System matches Intent with Activity that can best provide the service Activities and IntentReceivers describe what Intents they can service
Services
Faceless components that run in the background E.g.: music player, network download, etc
Content Providers
Enables sharing of data across applications E.g.: address book, photo gallery, etc... Provides uniform APIs for: querying delete, update and insert. Content is represented by URI and MIME type
Active Process critical priority Visible Process high priority Service Process normal priority Background Process low priority Empty process
Applications
All apps (native and 3rd party) are written using the same APIs and run on the same run time executable All apps have APIs for: hardware access, location-based services, support for background services, map-based activities, 2D and 3D graphics. App Widgets are miniature app views that can be embedded in other apps like Home Screen
Client apps
Developed using the Android SDK and installed on user devices Compiled Java code, with data and resource, bundled by Android Asset Packaging Tool (AAPT) into Android package (.apk) All applications have Android Manifest file in its root directory provides essential information about app Could be installed directly on phone, but necessary to be distributed thru Market
Web Apps
An alternative to standalone apps Developed using web standards and accessed through browser nothing to install on devices Mixing client and web apps is also possible Client apps can embed web pages using Webview in Android app
Android UI
Activity: single screen with a UI, somewhat analogous to XAML / code behind pattern in .NET
Email app might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails Implement by subclassing Activity class View: drawable object
Android UI
Service: background operation
play music in the background while the user is in a different application fetch data over the network without blocking user interaction with an activity Content Provider: DB or other data access Broadcast Receiver: responds to system messages Battery low
Android UI
UI construction can be done in three ways: 1. Programmatic, like hand-coded Java desktop GUI construction 2. Declarative hand-written, like Java web UI construction XML 3. Declarative with a GUI builder, like .NET UI construction then GUI builder generates the XML
Programmatic UI
package cs454.demo;
Manual Declarative UI
main.xml Layout File: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/textview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/hello"/>
strings.xml resource file: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello Again, CS454!</string> <string name="app_name">CS454 AndroidDemo</string> </resources>
Manual Declarative UI
Java class: package cs454.demo; import android.app.Activity; import android.os.Bundle;
public class AndroidDemo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
DEVELOPMENT FEATURES 1
Multimedia Audio and video playback and record ability will be native in the devices. Interrogate these and use as desired eg. video recording, music playback, microphone for audio notes.
Network Most Android devices will be Internet ready. The net can be accessed at any desired level, from Java sockets to the integral WebKit-based web browser which can be embedded into your apps.
DEVELOPMENT FEATURES 2
Storage Global positioning system (GPS) Many devices will have GPS receiver to dtermine location. This location data can be used in navigation as well as triggering activities. Phone services All phone services eg. Initiate and receive calls, short messages, data transmittals
Ada pertanyaan?
Terima Kasih