introduction of android...
TRANSCRIPT
1
Introduction of Android
Application
I Komang Sugiartha, S.Kom., MMSI
Resume
• 2010 : S1 Sistem Informasi Universitas Gunadarma
• 2014 : S2 Magister Manajemen Sistem Informasi Universitas Gunadarma
• 2017 - Now : S3 Teknlogi Informasi Universitas Gunadarma
• 2016 – Now : Dosen Universitas Gunadarma
• 2016 – Now : Staff Incubator Business Center - UG
• 2015 – Now : Head of Robotics and Course Development Robot Edukasi
• 2018 - Now : Co-Founder of KemangKres
3
What is Android?
A Software platform and operating system for mobile.
Based on the Linux kernel.
Android was found way back in 2003.
It was developed in Palo Alto, California.
Android was purchased by the GOOGLE in AUGUST,2005 for US$ 50 million.
Android OS
An open-source operating system based on the Linux kernel
Designed primarily for touchscreen mobile devices such as smartphones and tablet computers
1 billion Android devices have been activated
48 billion apps have been installed
5
Phones
HTC G1,Droid,Tattoo
Motorola Droid (X)
Suno S880 Samsung Galaxy Sony Ericsson
6
Tablets
Velocity Micro Cruz Gome FlyTouch Acer beTouch
Dawa D7
Toshiba Android SmartBook
Cisco Android Tablet
7
Others
Watches
SmartTV
Google Glasses
Portable/CarDevices
8
Market Share Smartphone
(Q2 2018): 88%Source (https://www.statista.com/statistics/266136/global-market-share-held-by-smartphone-operating-systems)
Android Architecture
10
Android S/W Stack - Application
Android provides a set of core applications:
Email Client
SMS Program
Calendar
Maps
Browser
Contacts
Etc
All applications are written using the Java language.
11
Android S/W Stack –
App Framework
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.
12
Android S/W Stack –
App Framework (Cont)
FeaturesFeature Role
View System
Used to build an application, including lists, grids, textboxes, buttons, and embedded web browser
Content Provider
Enabling applications to access data from other applications or to share their own data
Resource Manager
Providing access to non-code resources (localized strings, graphics, and layout files)
Notification Manager
Enabling all applications to display customer alerts in the status bar
Activity Manager
Managing the lifecycle of applications and providing a common navigation backstack
13
Android S/W Stack - Libraries
Including a set of C/C++ libraries used by components of the Android system
Exposed to developers through the Android application framework
14
Android S/W Stack - Runtime
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
Etc
15
JVM
16
Android S/W Stack – Runtime
(Cont)
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
17
Android S/W Stack – Runtime
(Cont)
Dalvik Virtual Machine (Cont)
Executing the Dalvik Executable (.dex) format
.dex format is optimized for minimal memory footprint.
Compilation
Relying on the Linux Kernel for:
Threading
Low-level memory management
18
Android S/W Stack – Linux Kernel
Relying on Linux Kernel 2.6 for core system services
Memory and Process Management
Network Stack
Driver Model
Security
Providing an abstraction layer between the H/W and the rest
of the S/W stack
19
Development Tools
MIT App Inventor
Cordova
Android Studio
20
MIT App Inventor
Easy for learners to create mobile apps for Android smart phones
Visually fitting together puzzle piece-shaped "programming blocks"
Web-based
1st quarter of 2012, MIT Center for Mobile Learning launched App Inventor service for general public access
21
MIT App Inventor
Programming Blocks
22
MIT App Inventor
(Component Designer)
23
MIT App Inventor
(Block Editor)
24
Cordova
Apache Cordova is a platform for building natively installed mobile applications using HTML, CSS and JavaScript
25
Cordova
Apache Cordova was originally called Phonegap build by Nitobi
Open-source & free software from the beginning (MIT License), Apache License now
PhoneGap is still a product of Adobe. It is a distribution of Apache Cordova.
26
Cordova Application
27
Android Studio (Getting Started 1) Need to install Java Development Kit (JDK) to write
Java (and Android) programs Do not install Java Runtime Environment (JRE);
JDK and JRE are different! Can download the JDK for your OS at
http://java.oracle.com Alternatively, for OS X, Linux:
OS X: Open /Applications/Utilities/Terminal.app Type javac at command line
Install Java when prompt appears Linux:
Type sudo apt–get install default–jdk at command line (Debian, Ubuntu)
Other distributions: consult distribution’s documentation
28
Install!
28
29
Android Studio (Getting Started 2)
After installing JDK, download Android SDK from http://developer.android.com
Simplest: download and install Android Studio bundle (including Android SDK) for your OS
Alternatives: Download/install Android Developer Tools
from this site (based on Eclipse) Install Android SDK tools by themselves,
then install ADT for Eclipse separately (from this site)
We’ll use Android Studio with SDK included (easy)
@2011 Mihail L. Sichitiu 30
Install!
30
Android Studio (Getting Started 3)
Install Android Studio directly (Windows, Mac); unzip to directory android-studio, then run ./android-studio/bin/studio.sh(Linux)
You should see this:
@2011 Mihail L. Sichitiu 31
Creating Android App (1)
Creating Android app project in Android Studio:
Go to File→New Project
Enter app, project name
Choose package name using “reverse URL” notation, e.g., edu.osu.myapp
Select APIs for app, then click Next
32
Creating Android App (2)
Determine what kind of Activity to create; then click Next
We’ll choose a Blank Activity for simplicity
Enter information about your Activity, then click Finish
This creates a “Hello World” app
33
Deploying the App
Two choices for deployment: Real Android device
Android virtual device
Plug in your real device; otherwise, create an Android virtual device
Emulator is slow. Try Intel accelerated version, or perhapshttp://www.genymotion.com/
Run the app: press “Run” button in toolbar
34
Project structure
35
App manifest
Java code
Resources
Build scripts
36
Android Manifest
Its main purpose in life is to declare the components to the system:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demo">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.example.demo.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
37
Activity life cycle
An Android activity is focused on a single thing a user can do.
Most applications have multiple activities
Layouts
38
LinearLayout
A Layout that arranges its children in a single column or a single row.
39
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
RelativeLayout
A Layout where the positions of the children can be described in relation to each other or to the parent.
40
Child 1 is relative to the top left corner of the screen.
Child 2 is relative to the center of the screen.
Child 3 is positioned below child 2
FrameLayout
A layout that stacks views along the z-axis.
41
Demo Apps – MIT App InventorSource
(https://play.google.com/store/apps/details?id=com.thunkable.android.sugiartha26
.AppsRobotEdukasi)
42
Demo Apps – CordovaSource
(https://play.google.com/store/apps/details?id=com.robotedukasi.belajars4aarduino)
43
Demo Apps – Android StudioSource
(https://play.google.com/store/apps/details?id=com.smartgarden.smartgardenbali)
44
Demo Apps – Android Studio
Sistem Akademik Sekolah
45
Dashboard
@2011 Mihail L. Sichitiu 46
Demo Apps – Android Studio
Smart Tourism
@2011 Mihail L. Sichitiu 47
Dashboard
@2011 Mihail L. Sichitiu 48
TERIMA KASIH
@2011 Mihail L. Sichitiu 49