• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Android sessions gtug ph singapore
 

Android sessions gtug ph singapore

on

  • 1,072 views

 

Statistics

Views

Total Views
1,072
Views on SlideShare
1,065
Embed Views
7

Actions

Likes
0
Downloads
12
Comments
0

1 Embed 7

http://www.linkedin.com 7

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Android sessions gtug ph singapore Android sessions gtug ph singapore Presentation Transcript

  • Marc Lester Tan+ http://gplus.to/marctant @mharkusin http://sg.linkedin.com/in/marclestertan
  • Exploring Android A GTUG-PH Singapore Chapter EventMarc Lester Tan+ http://gplus.to/marctant @mharkusin http://sg.linkedin.com/in/marclestertan
  • What is Android?
  • What is Android?Application framework
  • What is Android?Application frameworkDalvik VM
  • What is Android?Application frameworkDalvik VMIntegrated browser based on WebKit
  • What is Android?Application frameworkDalvik VMIntegrated browser based on WebKitOptimized Graphics (skia for 2D and OpenGL ES for3D)
  • What is Android?Application frameworkDalvik VMIntegrated browser based on WebKitOptimized Graphics (skia for 2D and OpenGL ES for3D)SQLite
  • What is Android?Application frameworkDalvik VMIntegrated browser based on WebKitOptimized Graphics (skia for 2D and OpenGL ES for3D)SQLiteMedia Support
  • What is Android?Application frameworkDalvik VMIntegrated browser based on WebKitOptimized Graphics (skia for 2D and OpenGL ES for3D)SQLiteMedia Support
  • What is Android?
  • What is Android?GSM Telephony
  • What is Android?GSM TelephonyBluetooth, EDGE, 3G and WIFI
  • What is Android?GSM TelephonyBluetooth, EDGE, 3G and WIFICamera, GPS, compass and accelerometer
  • What is Android?GSM TelephonyBluetooth, EDGE, 3G and WIFICamera, GPS, compass and accelerometerRich Development Environment
  • Why Android?• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Why Android? 200 million devices worldwide• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Why Android? 200 million devices worldwide 6 billion downloads in Android Market• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Why Android? 200 million devices worldwide 6 billion downloads in Android Market 550,000 activations per day• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Why Android? 200 million devices worldwide 6 billion downloads in Android Market 550,000 activations per day 329,846 apps in the Android Market• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Why Android? 200 million devices worldwide 6 billion downloads in Android Market 550,000 activations per day 329,846 apps in the Android Market 171 devices from 17 manufacturers• Statistics as of November 2011• 200 million Android activations!• Google Music Event (11/16/11)• AppBrain Market Stats• Google Phones List
  • Top Mobile OEMs (US) July 2011 Samsung 25.5% LG 20.9% Motorola 14.1% Apple 9.5% RIM 7.6%http://www.comscore.com/Press_Events/Press_Releases/2011/8/comScore_Reports_July_2011_U.S._Mobile_Subscriber_Market_Share
  • Top Smartphone Platforms July 2011 Google 41.8% Apple 27.0% RIM 21.7% Microsoft 5.7% Symbian 1.9%http://www.comscore.com/Press_Events/Press_Releases/2011/8/comScore_Reports_July_2011_U.S._Mobile_Subscriber_Market_Share
  • Your First Android App
  • Your First Android App
  • Requirements
  • RequirementsJava SE 6
  • RequirementsJava SE 6Android SDK
  • RequirementsJava SE 6Android SDKEclipse Indigo or Maven 3.0
  • RequirementsJava SE 6Android SDKEclipse Indigo or Maven 3.0Android-Maven-Plugin if you want to use Maven
  • RequirementsJava SE 6Android SDKEclipse Indigo or Maven 3.0Android-Maven-Plugin if you want to use MavenADT plugin if you want to use Eclipse
  • Eclipse ADT Demo
  • Emulator
  • EmulatorMimics most of the hardwareand software features of amobile device
  • EmulatorMimics most of the hardwareand software features of amobile deviceCan simulate applicationinterrupts such as incomingSMS or phone calls
  • EmulatorMimics most of the hardwareand software features of amobile deviceCan simulate applicationinterrupts such as incomingSMS or phone callsSimulate GPS location fix
  • Emulator Limitations
  • Emulator LimitationsPlacing or receiving phone calls
  • Emulator LimitationsPlacing or receiving phone callsUSB connections
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)Determining Connected State
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)Determining Connected StateDetermining Battery charge level and ACcharging state
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)Determining Connected StateDetermining Battery charge level and ACcharging stateUnable to listen for SD Card insert/eject
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)Determining Connected StateDetermining Battery charge level and ACcharging stateUnable to listen for SD Card insert/ejectBluetooth
  • Emulator LimitationsPlacing or receiving phone callsUSB connectionsCamera / Video Capture (input)Determining Connected StateDetermining Battery charge level and ACcharging stateUnable to listen for SD Card insert/ejectBluetoothAccelerometer
  • Application structure
  • Application structure/src/ - location for all your java files
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java/assets/ - fonts, audio files and other compressed files
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java/assets/ - fonts, audio files and other compressed files/bin/ - target directory to store the dex file and the APK
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java/assets/ - fonts, audio files and other compressed files/bin/ - target directory to store the dex file and the APK/res/ - drawables, layouts and strings
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java/assets/ - fonts, audio files and other compressed files/bin/ - target directory to store the dex file and the APK/res/ - drawables, layouts and stringsAndroidManifest.xml - tells a lot of things about yourapplication
  • Application structure/src/ - location for all your java files/gen/ - autogenerated file R.java/assets/ - fonts, audio files and other compressed files/bin/ - target directory to store the dex file and the APK/res/ - drawables, layouts and stringsAndroidManifest.xml - tells a lot of things about yourapplicationproguard.cfg - configuration file for source codeobfuscation
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mlst.hellogtug" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Main" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
  • Activitypackage com.mlst.hellogtug;import android.app.Activity;import android.os.Bundle;public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
  • Activitypackage com.mlst.hellogtug;import android.app.Activity;import android.os.Bundle;public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
  • Activitypackage com.mlst.hellogtug;import android.app.Activity;import android.os.Bundle;public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
  • Activitypackage com.mlst.hellogtug;import android.app.Activity;import android.os.Bundle;public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • XML-Based Layout (main.xml)<?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:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • strings.xml<?xml version="1.0" encoding="utf-8"?><resources> <string name="hello">Hello World,Main!</string> <string name="app_name">HelloGTUG</string></resources>
  • Running your application
  • Running your application1. Launch the emulator
  • Running your application1. Launch the emulator2. Install the application using ADB or Android Debug Bridge (adb install application.apk)
  • Running your application1. Launch the emulator2. Install the application using ADB or Android Debug Bridge (adb install application.apk)3. Monitor the logs by using Android Debug Bridge (adb logcat or adb lolcat - adds more fun)
  • Running your application1. Launch the emulator2. Install the application using ADB or Android Debug Bridge (adb install application.apk)3. Monitor the logs by using Android Debug Bridge (adb logcat or adb lolcat - adds more fun)4.Modify code then repeat #2
  • Debugging your AppWindow > Open Perspective > DDMSSelect the application to debug in Devices sectionClick the green bug icon at the toolbarSet your breakpoints
  • Questions