SlideShare a Scribd company logo
Peter van der Linden
Android Technology
Evangelist
Jan 2014

NASDAQ: IMMR

Code to go!

Writing your first Android app
©2012 Immersion Corporation–Confidential
■ Agenda
1

Compilation tools

2

Importing an existing project

3

The folders that make up an app

4

GUI Basics

5

Run it!

Slides online at:

©2012 Immersion Corporation–Confidential
1 Compilation tools
2

Importing an existing project

3

The folders that make up an app

4

GUI Basics

5

Adding some Views

©2012 Immersion Corporation–Confidential
Compilation tools
■  Technologies:
■  Java, XML, SQLite, OpenGL, embedded development

■  Tools
■  Eclipse (and Android Studio, based on IntelliJ IDE)
■  Android SDK
■  Platform libraries

©2012 Immersion Corporation–Confidential
Compilation tools

Eclipse
ADT
Eclipse
plugin

workspace
project

your app
code

platform
library

©2012 Immersion Corporation–Confidential

SDK
build
Eclipse main screen

©2012 Immersion Corporation–Confidential
Eclipse main screen

Your
source code
file

Your projects

©2012 Immersion Corporation–Confidential
Using Eclipse
■  Eclipse video tutorials
http://eclipsetutorial.sourceforge.net/totalbeginner.html
http://www.vogella.de/articles/Eclipse/article.html

■  Eclipse “Perspective” reset
Window > Reset Perspective > Yes

©2012 Immersion Corporation–Confidential
1

Compilation tools

2 Importing an existing project
3

The folders that make up an app

4

GUI Basics

5

Run it!

©2012 Immersion Corporation–Confidential
What if I did not download any platforms?
Then do it now. Download Platform 14, and use that throughout.
In Eclipse, click on Window > Android SDK Manager

Running your Studio Project

Under “Android 4.0 (API 14) Click on “SDK Platform”
Then click “Install”

These are large 100MB downloads – don’t download more than you
need till you are back on your home network

©2012 Immersion Corporation–Confidential
What if I did not put the SDK tools in my path?
Take a demerit for Gryffindor, and add the folders now.
MacOS – edit file ~/.bash_profile to add these 2 directories to PATH
by adding this at the end of the file (use names for your PC!)

Running your Studio Project

export PATH=$PATH:/Users/plinden/android-sdk-macosx/
tools:/Users/plinden/android-sdk-macosx/platform-tools!

Linux – add the SDK two folders, tools and platform-tools, to your
PATH in your shell initialization file (file varies with the shell you
use).
Windows – path environment variable is set somewhere under control
panel. Google “Windows 7 set env variable” (windows 8 etc)

©2012 Immersion Corporation–Confidential
Get my existing project “feels” into Eclipse
Download the zip file from http://goo.gl/TN2Hpq
On that page, hit File > Download

©2012 Immersion Corporation–Confidential
Importing existing project into Eclipse
Unzip the downloaded feels.zip file somewhere handy
File > Import … > Existing files into workspace

©2012 Immersion Corporation–Confidential
Imported project appears in Eclipse

You can expand folders by clicking right pointing triangle
If project has errors, click Project > Clean > OK
©2012 Immersion Corporation–Confidential
■ Agenda
1

Compilation tools

2

Creating a new project

3 The folders that make up an app
4

GUI Basics

5

Adding some Views

6

Execution tools

©2012 Immersion Corporation–Confidential
Files that make up a Mobile App
■  Java files
■  Resource files
■  Png files for icons (up to 5 different screen resolutions)
■  XML files to specify the GUI layout and controls
■  XML files to hold literal strings
■  A project manifest file in XML
■  Asset files (photos, music, video…, other files not
compiled or localized)

©2012 Immersion Corporation–Confidential
Ingredients of an App
•  Source code for every Android app has:
AndroidManifest.xml
describes the app overall, features used, version, etc

Java

“glue”

XML, icons

Media, data files, etc

•  App binary is an .apk file (zip format)
•  contains the compiled version of these files
©2012 Immersion Corporation–Confidential
The “Top 2 folders” – src, res
■  Java files

■  Resource files
■  Png files for icons (1-5 dpi’s)

{

■  XML files for GUI layout
■  XML files to hold literal strings
■  A project manifest file in XML
■  Restriction: filenames under res folder must contain only
lowercase a-z, 0-9, or _.
©2012 Immersion Corporation–Confidential
1

Compilation tools

2

Importing an existing project

3

The folders that make up an app

4 GUI Basics
5

Run it!

©2012 Immersion Corporation–Confidential
GUIs in Android
Views (Widgets, Controls)
■  E.g. Button, CheckBox, TextView, ProgressBar,
■  About 70 basic controls

Layouts
■  Defines where each View is on a screen
■  One XML file per screen
■  “alternative resources” – diff layout for portrait vs land

Event handlers
■  When a user “operates” a View, it fires an event
■  Developer writes event handler code to process it
©2012 Immersion Corporation–Confidential
GUIs in Android - diagram
Layout

Views

Event Handlers
open_db();

take_pic();

§  how it looks
§  what events it fires
§  specified in XML
in a layout file

§  position on screen
§  specified in XML file
§  the Activity sets this file
as its “content view” (how it
looks)

©2012 Immersion Corporation–Confidential

§  what happens
when view is clicked
§  written in Java
Some Views in more detail

©2012 Immersion Corporation–Confidential
Peter’s handy-dandy XML cheat-sheet
What it’s called

What it looks like

Declaration

<?xml version="1.0" encoding="utf-8"?>

Element

<someTagName attributes> nested_elements </someTagName>

Element

<someTagName attributes />

Attribute

someName=“someValue”

Comment

<!--

Namespace Declaration

Xmlns:someNamespaceName="someURI"

some commentary here -->

Android namespace
declaration

xmlns:android=
"http://schemas.android.com/apk/res/android"

Attribute name from
android namespace

android:layout_width="fill_parent"

©2012 Immersion Corporation–Confidential
Getting into XML
§  There is an XML file defining the GUI objects on its screen/
Activity
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent” >

<TextView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/hello” />

</LinearLayout>

©2012 Immersion Corporation–Confidential
XML for a View
§  Every View must have a value for android:layout_width and _height
Tells layout manager how much room you want
for the WIDTH and the HEIGHT of the component
§  "fill_parent” magic word that says “greedy – as much as possible”
“match_parent” is also used.

§  "wrap_content” magic word that says “frugal – as little as possible”

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello” />
©2012 Immersion Corporation–Confidential
Gluing XML names to Java code
The XML names in res folder are visible in Java namespace!
The glue code is generated for you.
Create an ID name for an XML element with this attribute
<TextView android:id="@+id/myTV"

In Java, get hold of that XML-declared TextView by:
TextView tv = (TextView) findViewById( R.id.myTV );

In XML, get hold of that XML-declared TextView by:
<Button android:layout_below=”@id/myTV"
©2012 Immersion Corporation–Confidential
android.widget.TextView
■  Appearance:

<TextView
android:layout_width=“fill_parent”

©2012 Immersion Corporation–Confidential

/>
android.widget.TextView
■  Appearance:

<TextView
android:layout_width=“wrap_content”

©2012 Immersion Corporation–Confidential

/>
android.widget.TextView
■  Appearance:

■  XML in

res/layout/myname.xml

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0FF"
android:text="width is wrap_content" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FF0000"
android:text="width is fill_parent" />
©2012 Immersion Corporation–Confidential
Easy to make mistakes!
■  Appearance:

XML in

res/layout/myname.xml

<TextView
android:layout_width="wrap_content"
android:layout_height=”fill_parent"
android:background="#0FF"
android:text="width is wrap_content" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FF0000"
android:text="width is fill_parent" />
©2012 Immersion Corporation–Confidential
Attributes for android.widget.TextView
■  Use the Android Developer Docs
■  http://developer.android.com/reference/android/R.styleable.html#TextView

■  There are about 75 attributes for TextView

©2012 Immersion Corporation–Confidential
android.widget.Button
■  Appearance:
disabled

enabled

■  XML
<Button android:layout_width="fill_parent"
android:layout_height="wrap_content”
android:text="@string/brew"
android:id="@+id/bt" />

©2012 Immersion Corporation–Confidential

pressed
android.widget.EditText
■  Appearance:
<EditText

a

someAttributes

/>

■  Subclass of TextView
■  No new attributes of its own
■  Requires the usual layout attribs
■  Click in the field to get keyboard
■  And type away…
©2012 Immersion Corporation–Confidential
Event Handlers in more detail

©2012 Immersion Corporation–Confidential
android.widget.EditText Event Handler
■  Gives you the contents of entire field for each keypress
■  Implement

android.view.View.OnKeyListener

■  Only has 1 method:
onKey(View v, int keyCode, KeyEvent event)

■  Register your listener with:
myedittext.setOnKeyListener( objOnKeyListener );

©2012 Immersion Corporation–Confidential
android.widget.EditText

key listener

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final EditText et = (EditText) findViewById(R.id.et);
OKL my_okl = new OKL();
et.setOnKeyListener(my_okl);
}
}

class OKL implements OnKeyListener {
public boolean onKey(View v, int keyCode, KeyEvent event) {
if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
(keyCode == KeyEvent.KEYCODE_ENTER)) {
// Perform action only for "return" key press
EditText et = (EditText) v;
Log.i("Hi app", et.getText().toString());
return true; // have "consumed event"
}
return false;

// have not consumed event

}
}

©2012 Immersion Corporation–Confidential
android.widget.Button
■  Gives you an event when clicked
■  Implement android.view.View.OnClickListener
■  Only has 1 method:
onClick(View v)

■  Register your listener with code:
mybutton.setOnClickListener( objOnClickListener);

■  Or register your listener with XML attribute:
<Button … android.onClick=“doAction” />
public void doAction(View v) { … }
©2012 Immersion Corporation–Confidential
android.widget.Button event handler
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button bt = (Button)findViewById(R.id.bt);
CL my_cl = new CL();
bt.setOnClickListener(my_cl);
}
public void doAction(View v) { // button has been pressed
Log.i("Hi app", v.toString() + " pressed,doAction called");
}
class CL implements OnClickListener {
public void onClick(View v) {
Log.i("Hi app", v.toString() + " pressed");
}
}

©2012 Immersion Corporation–Confidential
Debugging

First choice – the debugger
Here are some quick ‘n dirty alternatives
to see what is going on in your code

©2012 Immersion Corporation–Confidential
Always have “adb logcat” running in a terminal!
01-22 18:31:30.520 11946 11946 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40018560)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: FATAL EXCEPTION: main
01-22 18:31:30.559 11946 11946 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hi/
com.example.hi.HiActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Checkbox
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:124)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.os.Looper.loop(Looper.java:130)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:3806)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:507)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class Checkbox
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.Activity.setContentView(Activity.java:1703)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.example.hi.HiActivity.onCreate(HiActivity.java:19)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660)
01-22 18:31:30.559 11946 11946 E AndroidRuntime: ... 11 more
01-22 18:31:30.559 11946 11946 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: android.view.Checkbox in loader
dalvik.system.PathClassLoader[/data/app/com.example.hi-1.apk]

©2012 Immersion Corporation–Confidential
Logging
import android.util.Log;
Log.i(”Activity ID", “message to log, i=” + i);

In a shell, run
$ adb logcat

©2012 Immersion Corporation–Confidential
Toast
Toast – an easy way to make text “pop up”
on screen. Do it when in UI thread in
Activity.
!
import android.widget.toast;!
…!
Toast.makeText( this, !
! ! !“my string”,!
! ! !Toast.LENGTH_LONG ).show();!
!
!

this is the toast pop-up
©2012 Immersion Corporation–Confidential
1

Compilation tools

2

Creating a new project

3

The folders that make up an app

4

GUI Basics

5 Run it!

©2012 Immersion Corporation–Confidential
Create a virtual device
Window > Android Virtual Device Manager

©2012 Immersion Corporation–Confidential
Create a virtual device
The only config that really matters is the platform API level. Here API 14.

©2012 Immersion Corporation–Confidential
Create a virtual device
Window > Android Virtual Device Manager

©2012 Immersion Corporation–Confidential
©2012 Immersion Corporation–Confidential
Run app on phone / tablet

©2012 Immersion Corporation–Confidential
©2012 Immersion Corporation–Confidential
Well Done!
§  Well done!
§  We’re done!
§  Q & A welcome

©2012 Immersion Corporation–Confidential
Connect with Immersion
#HapticsDev

like “ImmersionDeveloper”

search “Immersion Corporation”

©2012 Immersion Corporation–Confidential
Some great Android resources
§  http://developer.android.com
§  http://developer.immersion.com
§  http://stackoverflow.com
§  Web search for keywords “Android notification tutorial”
§  Have a great time with this!

©2012 Immersion Corporation–Confidential
Ad

More Related Content

Viewers also liked (10)

Grand finale
Grand finaleGrand finale
Grand finale
Peter van der Linden
 
Droidcon berlin Apr2013
Droidcon berlin Apr2013Droidcon berlin Apr2013
Droidcon berlin Apr2013
Peter van der Linden
 
Master pass api
Master pass apiMaster pass api
Master pass api
Peter van der Linden
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
Peter van der Linden
 
GDC 2014 talk Haptics Android
GDC 2014 talk  Haptics AndroidGDC 2014 talk  Haptics Android
GDC 2014 talk Haptics Android
Peter van der Linden
 
Putting real feeling into Android Apps
Putting real feeling into Android AppsPutting real feeling into Android Apps
Putting real feeling into Android Apps
Peter van der Linden
 
Master cardapis v7.2020
Master cardapis v7.2020Master cardapis v7.2020
Master cardapis v7.2020
Peter van der Linden
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
Lars Vogel
 
Coding to the MasterCard OpenAPIs
Coding to the MasterCard OpenAPIsCoding to the MasterCard OpenAPIs
Coding to the MasterCard OpenAPIs
Peter van der Linden
 
Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
Yong Heui Cho
 

Similar to Code to go Android (20)

Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
Eyad Almasri
 
PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J Krishnan
OrisysIndia
 
Android momobxl
Android momobxlAndroid momobxl
Android momobxl
Steven Palmaers
 
Ayw android env_setup
Ayw android env_setupAyw android env_setup
Ayw android env_setup
pbeerak
 
Unit 2 in environment science and technology
Unit 2 in environment science and technologyUnit 2 in environment science and technology
Unit 2 in environment science and technology
saimohith981
 
Android
AndroidAndroid
Android
BVP GTUG
 
ANDROID PPT 1.pdf
ANDROID PPT 1.pdfANDROID PPT 1.pdf
ANDROID PPT 1.pdf
Siva Krishna Prasad
 
Android application development
Android application developmentAndroid application development
Android application development
slidesuren
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
AbhishekKumar4779
 
Android Intro
Android IntroAndroid Intro
Android Intro
Justin Grammens
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android project
Siva Kumar reddy Vasipally
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Kasun Dananjaya Delgolla
 
AndEngine
AndEngineAndEngine
AndEngine
TheBeege
 
Anatomy of a Codename One Application
Anatomy of a Codename One ApplicationAnatomy of a Codename One Application
Anatomy of a Codename One Application
ShaiAlmog1
 
Installing eclipse & sdk
Installing eclipse & sdkInstalling eclipse & sdk
Installing eclipse & sdk
Arun Kumar
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
Vibrant Technologies & Computers
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
Nandini Prabhu
 
Native apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged appsNative apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged apps
Tom Wilson
 
Android development session
Android development sessionAndroid development session
Android development session
Esraa Ibrahim
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
Eyad Almasri
 
PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J Krishnan
OrisysIndia
 
Ayw android env_setup
Ayw android env_setupAyw android env_setup
Ayw android env_setup
pbeerak
 
Unit 2 in environment science and technology
Unit 2 in environment science and technologyUnit 2 in environment science and technology
Unit 2 in environment science and technology
saimohith981
 
Android application development
Android application developmentAndroid application development
Android application development
slidesuren
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
AbhishekKumar4779
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android project
Siva Kumar reddy Vasipally
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Kasun Dananjaya Delgolla
 
Anatomy of a Codename One Application
Anatomy of a Codename One ApplicationAnatomy of a Codename One Application
Anatomy of a Codename One Application
ShaiAlmog1
 
Installing eclipse & sdk
Installing eclipse & sdkInstalling eclipse & sdk
Installing eclipse & sdk
Arun Kumar
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
Nandini Prabhu
 
Native apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged appsNative apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged apps
Tom Wilson
 
Android development session
Android development sessionAndroid development session
Android development session
Esraa Ibrahim
 
Ad

Recently uploaded (20)

How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Financial Services Technology Summit 2025
Financial Services Technology Summit 2025Financial Services Technology Summit 2025
Financial Services Technology Summit 2025
Ray Bugg
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Foundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google CertificateFoundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
TrsLabs - Leverage the Power of UPI Payments
TrsLabs - Leverage the Power of UPI PaymentsTrsLabs - Leverage the Power of UPI Payments
TrsLabs - Leverage the Power of UPI Payments
Trs Labs
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Financial Services Technology Summit 2025
Financial Services Technology Summit 2025Financial Services Technology Summit 2025
Financial Services Technology Summit 2025
Ray Bugg
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Foundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google CertificateFoundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
TrsLabs - Leverage the Power of UPI Payments
TrsLabs - Leverage the Power of UPI PaymentsTrsLabs - Leverage the Power of UPI Payments
TrsLabs - Leverage the Power of UPI Payments
Trs Labs
 
Ad

Code to go Android

  • 1. Peter van der Linden Android Technology Evangelist Jan 2014 NASDAQ: IMMR Code to go! Writing your first Android app ©2012 Immersion Corporation–Confidential
  • 2. ■ Agenda 1 Compilation tools 2 Importing an existing project 3 The folders that make up an app 4 GUI Basics 5 Run it! Slides online at: ©2012 Immersion Corporation–Confidential
  • 3. 1 Compilation tools 2 Importing an existing project 3 The folders that make up an app 4 GUI Basics 5 Adding some Views ©2012 Immersion Corporation–Confidential
  • 4. Compilation tools ■  Technologies: ■  Java, XML, SQLite, OpenGL, embedded development ■  Tools ■  Eclipse (and Android Studio, based on IntelliJ IDE) ■  Android SDK ■  Platform libraries ©2012 Immersion Corporation–Confidential
  • 6. Eclipse main screen ©2012 Immersion Corporation–Confidential
  • 7. Eclipse main screen Your source code file Your projects ©2012 Immersion Corporation–Confidential
  • 8. Using Eclipse ■  Eclipse video tutorials http://eclipsetutorial.sourceforge.net/totalbeginner.html http://www.vogella.de/articles/Eclipse/article.html ■  Eclipse “Perspective” reset Window > Reset Perspective > Yes ©2012 Immersion Corporation–Confidential
  • 9. 1 Compilation tools 2 Importing an existing project 3 The folders that make up an app 4 GUI Basics 5 Run it! ©2012 Immersion Corporation–Confidential
  • 10. What if I did not download any platforms? Then do it now. Download Platform 14, and use that throughout. In Eclipse, click on Window > Android SDK Manager Running your Studio Project Under “Android 4.0 (API 14) Click on “SDK Platform” Then click “Install” These are large 100MB downloads – don’t download more than you need till you are back on your home network ©2012 Immersion Corporation–Confidential
  • 11. What if I did not put the SDK tools in my path? Take a demerit for Gryffindor, and add the folders now. MacOS – edit file ~/.bash_profile to add these 2 directories to PATH by adding this at the end of the file (use names for your PC!) Running your Studio Project export PATH=$PATH:/Users/plinden/android-sdk-macosx/ tools:/Users/plinden/android-sdk-macosx/platform-tools! Linux – add the SDK two folders, tools and platform-tools, to your PATH in your shell initialization file (file varies with the shell you use). Windows – path environment variable is set somewhere under control panel. Google “Windows 7 set env variable” (windows 8 etc) ©2012 Immersion Corporation–Confidential
  • 12. Get my existing project “feels” into Eclipse Download the zip file from http://goo.gl/TN2Hpq On that page, hit File > Download ©2012 Immersion Corporation–Confidential
  • 13. Importing existing project into Eclipse Unzip the downloaded feels.zip file somewhere handy File > Import … > Existing files into workspace ©2012 Immersion Corporation–Confidential
  • 14. Imported project appears in Eclipse You can expand folders by clicking right pointing triangle If project has errors, click Project > Clean > OK ©2012 Immersion Corporation–Confidential
  • 15. ■ Agenda 1 Compilation tools 2 Creating a new project 3 The folders that make up an app 4 GUI Basics 5 Adding some Views 6 Execution tools ©2012 Immersion Corporation–Confidential
  • 16. Files that make up a Mobile App ■  Java files ■  Resource files ■  Png files for icons (up to 5 different screen resolutions) ■  XML files to specify the GUI layout and controls ■  XML files to hold literal strings ■  A project manifest file in XML ■  Asset files (photos, music, video…, other files not compiled or localized) ©2012 Immersion Corporation–Confidential
  • 17. Ingredients of an App •  Source code for every Android app has: AndroidManifest.xml describes the app overall, features used, version, etc Java “glue” XML, icons Media, data files, etc •  App binary is an .apk file (zip format) •  contains the compiled version of these files ©2012 Immersion Corporation–Confidential
  • 18. The “Top 2 folders” – src, res ■  Java files ■  Resource files ■  Png files for icons (1-5 dpi’s) { ■  XML files for GUI layout ■  XML files to hold literal strings ■  A project manifest file in XML ■  Restriction: filenames under res folder must contain only lowercase a-z, 0-9, or _. ©2012 Immersion Corporation–Confidential
  • 19. 1 Compilation tools 2 Importing an existing project 3 The folders that make up an app 4 GUI Basics 5 Run it! ©2012 Immersion Corporation–Confidential
  • 20. GUIs in Android Views (Widgets, Controls) ■  E.g. Button, CheckBox, TextView, ProgressBar, ■  About 70 basic controls Layouts ■  Defines where each View is on a screen ■  One XML file per screen ■  “alternative resources” – diff layout for portrait vs land Event handlers ■  When a user “operates” a View, it fires an event ■  Developer writes event handler code to process it ©2012 Immersion Corporation–Confidential
  • 21. GUIs in Android - diagram Layout Views Event Handlers open_db(); take_pic(); §  how it looks §  what events it fires §  specified in XML in a layout file §  position on screen §  specified in XML file §  the Activity sets this file as its “content view” (how it looks) ©2012 Immersion Corporation–Confidential §  what happens when view is clicked §  written in Java
  • 22. Some Views in more detail ©2012 Immersion Corporation–Confidential
  • 23. Peter’s handy-dandy XML cheat-sheet What it’s called What it looks like Declaration <?xml version="1.0" encoding="utf-8"?> Element <someTagName attributes> nested_elements </someTagName> Element <someTagName attributes /> Attribute someName=“someValue” Comment <!-- Namespace Declaration Xmlns:someNamespaceName="someURI" some commentary here --> Android namespace declaration xmlns:android= "http://schemas.android.com/apk/res/android" Attribute name from android namespace android:layout_width="fill_parent" ©2012 Immersion Corporation–Confidential
  • 24. Getting into XML §  There is an XML file defining the GUI objects on its screen/ Activity <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent” > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello” /> </LinearLayout> ©2012 Immersion Corporation–Confidential
  • 25. XML for a View §  Every View must have a value for android:layout_width and _height Tells layout manager how much room you want for the WIDTH and the HEIGHT of the component §  "fill_parent” magic word that says “greedy – as much as possible” “match_parent” is also used. §  "wrap_content” magic word that says “frugal – as little as possible” <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello” /> ©2012 Immersion Corporation–Confidential
  • 26. Gluing XML names to Java code The XML names in res folder are visible in Java namespace! The glue code is generated for you. Create an ID name for an XML element with this attribute <TextView android:id="@+id/myTV" In Java, get hold of that XML-declared TextView by: TextView tv = (TextView) findViewById( R.id.myTV ); In XML, get hold of that XML-declared TextView by: <Button android:layout_below=”@id/myTV" ©2012 Immersion Corporation–Confidential
  • 29. android.widget.TextView ■  Appearance: ■  XML in res/layout/myname.xml <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#0FF" android:text="width is wrap_content" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF0000" android:text="width is fill_parent" /> ©2012 Immersion Corporation–Confidential
  • 30. Easy to make mistakes! ■  Appearance: XML in res/layout/myname.xml <TextView android:layout_width="wrap_content" android:layout_height=”fill_parent" android:background="#0FF" android:text="width is wrap_content" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF0000" android:text="width is fill_parent" /> ©2012 Immersion Corporation–Confidential
  • 31. Attributes for android.widget.TextView ■  Use the Android Developer Docs ■  http://developer.android.com/reference/android/R.styleable.html#TextView ■  There are about 75 attributes for TextView ©2012 Immersion Corporation–Confidential
  • 32. android.widget.Button ■  Appearance: disabled enabled ■  XML <Button android:layout_width="fill_parent" android:layout_height="wrap_content” android:text="@string/brew" android:id="@+id/bt" /> ©2012 Immersion Corporation–Confidential pressed
  • 33. android.widget.EditText ■  Appearance: <EditText a someAttributes /> ■  Subclass of TextView ■  No new attributes of its own ■  Requires the usual layout attribs ■  Click in the field to get keyboard ■  And type away… ©2012 Immersion Corporation–Confidential
  • 34. Event Handlers in more detail ©2012 Immersion Corporation–Confidential
  • 35. android.widget.EditText Event Handler ■  Gives you the contents of entire field for each keypress ■  Implement android.view.View.OnKeyListener ■  Only has 1 method: onKey(View v, int keyCode, KeyEvent event) ■  Register your listener with: myedittext.setOnKeyListener( objOnKeyListener ); ©2012 Immersion Corporation–Confidential
  • 36. android.widget.EditText key listener public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final EditText et = (EditText) findViewById(R.id.et); OKL my_okl = new OKL(); et.setOnKeyListener(my_okl); } } class OKL implements OnKeyListener { public boolean onKey(View v, int keyCode, KeyEvent event) { if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { // Perform action only for "return" key press EditText et = (EditText) v; Log.i("Hi app", et.getText().toString()); return true; // have "consumed event" } return false; // have not consumed event } } ©2012 Immersion Corporation–Confidential
  • 37. android.widget.Button ■  Gives you an event when clicked ■  Implement android.view.View.OnClickListener ■  Only has 1 method: onClick(View v) ■  Register your listener with code: mybutton.setOnClickListener( objOnClickListener); ■  Or register your listener with XML attribute: <Button … android.onClick=“doAction” /> public void doAction(View v) { … } ©2012 Immersion Corporation–Confidential
  • 38. android.widget.Button event handler public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Button bt = (Button)findViewById(R.id.bt); CL my_cl = new CL(); bt.setOnClickListener(my_cl); } public void doAction(View v) { // button has been pressed Log.i("Hi app", v.toString() + " pressed,doAction called"); } class CL implements OnClickListener { public void onClick(View v) { Log.i("Hi app", v.toString() + " pressed"); } } ©2012 Immersion Corporation–Confidential
  • 39. Debugging First choice – the debugger Here are some quick ‘n dirty alternatives to see what is going on in your code ©2012 Immersion Corporation–Confidential
  • 40. Always have “adb logcat” running in a terminal! 01-22 18:31:30.520 11946 11946 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40018560) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: FATAL EXCEPTION: main 01-22 18:31:30.559 11946 11946 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hi/ com.example.hi.HiActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Checkbox 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:124) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.os.Looper.loop(Looper.java:130) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:3806) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:507) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class Checkbox 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.Activity.setContentView(Activity.java:1703) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at com.example.hi.HiActivity.onCreate(HiActivity.java:19) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660) 01-22 18:31:30.559 11946 11946 E AndroidRuntime: ... 11 more 01-22 18:31:30.559 11946 11946 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: android.view.Checkbox in loader dalvik.system.PathClassLoader[/data/app/com.example.hi-1.apk] ©2012 Immersion Corporation–Confidential
  • 41. Logging import android.util.Log; Log.i(”Activity ID", “message to log, i=” + i); In a shell, run $ adb logcat ©2012 Immersion Corporation–Confidential
  • 42. Toast Toast – an easy way to make text “pop up” on screen. Do it when in UI thread in Activity. ! import android.widget.toast;! …! Toast.makeText( this, ! ! ! !“my string”,! ! ! !Toast.LENGTH_LONG ).show();! ! ! this is the toast pop-up ©2012 Immersion Corporation–Confidential
  • 43. 1 Compilation tools 2 Creating a new project 3 The folders that make up an app 4 GUI Basics 5 Run it! ©2012 Immersion Corporation–Confidential
  • 44. Create a virtual device Window > Android Virtual Device Manager ©2012 Immersion Corporation–Confidential
  • 45. Create a virtual device The only config that really matters is the platform API level. Here API 14. ©2012 Immersion Corporation–Confidential
  • 46. Create a virtual device Window > Android Virtual Device Manager ©2012 Immersion Corporation–Confidential
  • 48. Run app on phone / tablet ©2012 Immersion Corporation–Confidential
  • 50. Well Done! §  Well done! §  We’re done! §  Q & A welcome ©2012 Immersion Corporation–Confidential
  • 51. Connect with Immersion #HapticsDev like “ImmersionDeveloper” search “Immersion Corporation” ©2012 Immersion Corporation–Confidential
  • 52. Some great Android resources §  http://developer.android.com §  http://developer.immersion.com §  http://stackoverflow.com §  Web search for keywords “Android notification tutorial” §  Have a great time with this! ©2012 Immersion Corporation–Confidential