Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Pengembangan Aplikasi Perangkat Bergerak Native Aryo Pinandito, ST, M.MT Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Google Android Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Google Android Architecture Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Development Environment • • • • • Android Developer Tools Eclipse-Based IDE Java Windows, Linux, Macintosh Requires Android SDK Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Android Activity An activity is a single, focused thing that the user can do. Interact with the user, Creating a window to place UI There are two methods almost all subclasses of Activity will implement: onCreate(Bundle) onPause() Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Android Activity Lifecycle Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Android XML Layout A layout defines the visual structure for a user interface, such as the UI for an activity or app widget. Using XML Programmatically during runtime Load using: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_layout); } Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya XML Layout Example <?xml version="1.0" encoding="utf-‐8"?> <LinearLayout xmlns:android="http://schemas.android.com/ apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello, I am a TextView" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello, I am a Button" /> </LinearLayout> Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Layout Hierarchy Example Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Common Layouts Linear Layout Relative Layout WebView List View GridView Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Input Controls <Button android:id="@+id/button_send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" android:onClick="sendMessage" /> Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Resources Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya The AndroidManifest.xml File The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. It names the Java package for the application. The package name serves as a unique identifier for the application. It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. These declarations let the Android system know what the components are and under what conditions they can be launched. Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya The AndroidManifest.xml File It determines which processes will host application components. It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. It also declares the permissions that others are required to have in order to interact with the application's components. It lists the Instrumentation classes that provide profiling and other information as the application is running. It declares the minimum level of the Android API that the application requires. It lists the libraries that the application must be linked against. Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya The Android SDK Emulator The Android SDK includes a mobile device emulator — a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device. Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Practice Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Tugas Buat sebuah permainan “Hangman” untuk platform Google Android dengan menggunakan ADT Laboratorium Web dan Mobile App PTIIK Universitas Brawijaya Any Questions? 감사합니다 Grazias Danke ﺷﻜﺮﺍﹰ Kiitos Gratias 谢谢 Terima Kasih Merci ध"यवाद Thank You ありがとうございます