SlideShare a Scribd company logo
1 of 40
Download to read offline
Peter van der Linden
Android Technology
Evangelist
Jan 2014, Chicago

NASDAQ: IMMR

Putting Real Feeling
Into Android apps!
©2012 Immersion Corporation–Confidential
■ Agenda
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
The Mobile User

©2012 Immersion Corporation–Confidential

4
Solo!

©2012 Immersion Corporation–Confidential

© 2011 Immersion Corporatio
Agency TBWANeboko
Photo: Michael Harvey

Touch feedback
fills the human need for tactile gratification

CBS News
Photo: Walter Geis

©2012 Immersion Corporation–Confidential

© 2011 Immersion Corporatio
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
Android API levels
http://goo.gl/LuNCDG

©2012 Immersion Corporation–Confidential
Choosing Android API levels
It’s a tradeoff
‱  You want the oldest possible API because – more
phones will run your app
‱  You want the newest possible API because – better
quality, better performance, widest range of new features
Review market share of different API levels
http://goo.gl/219Br4
API level 14 is a good choice at present, but will fade out.

©2012 Immersion Corporation–Confidential
Create new project - Exercise
To create a new Android project in Eclipse
1. start Eclipse
2. select File > New > Project.
3. expand “Android”, then click > Android Application Project,
and click Next.
4. enter Application Name: Hello.
5. Enter Project Name: Helloworld
7. Package name: com.example.helloworld.
6. Select Min Reqd SDK: “API 14 Android 4.0”
7. Select Target SDK: “API 14”
9. Compile with: ”API 19” or any >= 14 where you have downloaded
that platform Then hit ”Next”
10. on “New Android App” uncheck “custom launcher icon”, click “Next”
11. on “Create Activity”, click “Next”.
12. Click Finish.

©2012 Immersion Corporation–Confidential
Create new project step 2 - 3
2. select File > New > Project

3. expand “Android”, click > Android Application Project, click Next.

Running your Studio Project

©2012 Immersion Corporation–Confidential
Create a new Android project
■  File > New > Android Project

using Eclipse + ADT

Field

Purpose

Project name

What Eclipse calls this app Hello

Target

API level this app uses

14

App name

what phone calls the app

Hello

Package name

what Java calls the app

com.example.hello

Activity name

The file containing main

MainActivity

Min SDK version API level this app uses

Value to use

14

You must have installed the platform file for “target” and “minsdk” level that you choose. This is part of installing the
Eclipse bundle. Platforms live in the SDK & have names
like “platform-14”
©2012 Immersion Corporation–Confidential
Create new project step 4 - 9
4. enter Application Name: Hello.
5. Enter Project Name: Helloworld
7. Package name: com.example.helloworld.
6. Select Min Reqd SDK: “API 14 Android 4.0”
7. Select Target SDK: “API 14”
9. Compile with: ”API 14” or any >= 14 where you have
downloaded that platform Then hit ”Next”

Running your Studio Project

©2012 Immersion Corporation–Confidential
Create new project step 10
10. on “New Android App,” uncheck “custom launcher icon”,
click “Next”

Running your Studio Project

©2012 Immersion Corporation–Confidential
Create new project step 11
11. on “Create Activity”, click “Next”.
12. Click Finish.

Running your Studio Project

©2012 Immersion Corporation–Confidential
Create new project step 12
12. Note the “Activity name” and “layout name” you were given.
Click Finish.

©2012 Immersion Corporation–Confidential
New 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
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
Downloading the Immersion Haptic Platform
Immersion Haptic SDK Tools:
www.immersion.com/haptic/sdk
Â§ï‚§â€Ż Download the Haptic SDK (450KB)
Â§ï‚§â€Ż Download the Haptic Studio
(only for advanced custom effect design)

Haptic Effects Quick Start Guide:
www.immersion.com/haptic/guide

Immersion Haptic Effect Preview App
Â§ï‚§â€Ż Download FREE from Google Play

©2012 Immersion Corporation–Confidential

19
Add Haptics to “Hello World!” Project
‱  Download UHL zip file
‱  Copy extracted libImmEmulatorJ.so file to libs/armeabi
folder (create folders if necessary)
‱  Copy extracted UHL.jar to libs folder

©2012 Immersion Corporation–Confidential

2
0
Add a Button
in res/layout/activity_main.xml
<Button TextView!
android:text=”play effect!”!
android:onClick="handleClick"!
/>!
in src/
 MainActivity.java
import android.view.View;!
!
public void handleClick(View v) { }!

©2012 Immersion Corporation–Confidential

21
©2012 Immersion Corporation–Confidential

22
Add Vibrate permission
in top level AndroidManifest.xml
<manifest

xmlns:android= 


/>!

!
<uses-permission!
! android:name="android.permission.VIBRATE" />!
!
<application android:icon= !
<activity>!
</activity>!
</application>!
!
</manifest>!

©2012 Immersion Corporation–Confidential

23
Add Import Statement
Import the UHL classes into your Activity

in src/
 MainActivity.java
import com.immersion.uhl.*;!

©2012 Immersion Corporation–Confidential

24
Instantiate Launcher object
in src/
 MainActivity.java
public class MainActivity extends Activity {!
!
Launcher haptic;!
!
@Override!
public void onCreate(Bundle b) {!
super.onCreate(b);!
haptic = new Launcher(this);!

©2012 Immersion Corporation–Confidential

25
Use the Haptic
Effect Preview App

©2012 Immersion Corporation–Confidential

26
Play Effect
public	
  sta+c	
 Â ïŹnal	
  int	
  BOUNCE_100	
  =	
  0;	
  
	
  
	
  
	
  
public	
  sta+c	
 Â ïŹnal	
  int	
  EXPLOSION7=	
  	
  79;	
  
public	
  sta+c	
 Â ïŹnal	
  int	
  ENGINE4_33	
  =	
  123;

haptic.play(Launcher.EXPLOSION7);!

©2012 Immersion Corporation–Confidential

27
Stop any rendering when app Pauses
in src/
 MainActivity.java
@Override!
!protected void onPause() {!
! !super.onPause();!
! !haptic.stop();!
!}!

©2012 Immersion Corporation–Confidential

28
Harden the code

try {!
!
haptic.play(Launcher.EXPLOSION7);!
!
} catch (RuntimeException e) {!
Log.e(”MyTestApp", e.getMessage());!
}!
©2012 Immersion Corporation–Confidential

29
In a nutshell, that’s it!
That’s all you need to put haptics in your app
Now you can add cool pre-made haptic effects to your
game applications.

©2012 Immersion Corporation–Confidential

30
Immersion Haptic SDK Plugins
Â§ï‚§â€Ż Unity3D plugin

Â§ï‚§â€Ż Marmalade plugin

Â§ï‚§â€Ż YoYo Games

Plugins available at www.immersion.com/haptic/sdk

©2012 Immersion Corporation–Confidential

31
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
One time set up – using phone/tablet
Eclipse
ADT
Eclipse
plugin

SDK

Run As > Android Application

workspace
your
app
code

platform
library

©2012 Immersion Corporation–Confidential

actual
device
One time set up – PHONE / TABLET
Home > All Apps > Settings
‱  Applications > Development
‱  Click “USB Debugging” & “Stay awake”
‱  Different in Ice Cream Sandwich (Dev options)
‱  Different in Jelly Bean (Hidden! click “build num” 7x)

actual
device

Pull down Notification Shade > USB Connection
‱  Click “Charge only”, “OK”
Connect the device to your devt PC with a micro USB cable
If using Windows, you need to install a driver on Windows. Get
it from phone manufacturer’s developer website.
©2012 Immersion Corporation–Confidential
Run app on phone / tablet

©2012 Immersion Corporation–Confidential
1

Haptics

2

Creating a new project

3

Linking to a 3rd party Library

4

Running your code on a phone

5

Wrap up

©2012 Immersion Corporation–Confidential
Haptic Effect Preview App
Â§ï‚§â€Ż Free app on Google Play
Â§ï‚§â€Ż Feel each effect on any
Android device
Â§ï‚§â€Ż Code sample provided for
each effect
Â§ï‚§â€Ż Awesome on Android
handsets with TouchSense
installed by Samsung, LG,
Toshiba, Pantech and others
Â§ï‚§â€Ż Emulates effects on all other
Android devices without the
TouchSense technology

–  Allows vibe effects not available
with standard Google vibrate ()
method

©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://stackoverflow.com
Â§ï‚§â€Ż Various meetups –
Â§ï‚§â€Ż http://www.meetup.com/Android-Career-TrainingChicago/
Â§ï‚§â€Ż http://www.meetup.com/Newbie-Mobile-Developers/
Â§ï‚§â€Ż http://www.momochicago.org/
Â§ï‚§â€Ż http://www.meetup.com/chicago-google/
Â§ï‚§â€Ż Have a great time with this!
©2012 Immersion Corporation–Confidential
Contact Us Hap+csDev@immersion.com	
  
Like Us hNp://www.facebook.com/ImmersionDeveloper	
  
Follow Us @Hap+csDev	
  
Read Our Blog hNp://blog.immersion.com	
  
Direct Access: Peter van der Linden
plinden@immersion.com

Bob Heubel
rheubel@immersion.com
©2012 Immersion Corporation–Confidential

40

More Related Content

What's hot

seminar on androide
seminar on androideseminar on androide
seminar on androidevikram bharti
 
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...ActiveState
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidbantyder
 
TMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasTMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasKJR
 
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopAgile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopMichael Palotas
 
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail Mobility
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail MobilityKony-Cognizant Webinar: Finding the Silver Bullet in Retail Mobility
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail MobilityKony, Inc.
 

What's hot (7)

seminar on androide
seminar on androideseminar on androide
seminar on androide
 
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
 
DOCKER
DOCKERDOCKER
DOCKER
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
TMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasTMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael Palotas
 
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopAgile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery Workshop
 
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail Mobility
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail MobilityKony-Cognizant Webinar: Finding the Silver Bullet in Retail Mobility
Kony-Cognizant Webinar: Finding the Silver Bullet in Retail Mobility
 

Viewers also liked

Viewers also liked (8)

GDC 2014 talk Haptics Android
GDC 2014 talk  Haptics AndroidGDC 2014 talk  Haptics Android
GDC 2014 talk Haptics Android
 
Droidcon berlin Apr2013
Droidcon berlin Apr2013Droidcon berlin Apr2013
Droidcon berlin Apr2013
 
Grand finale
Grand finaleGrand finale
Grand finale
 
Code to go Android
Code to go AndroidCode to go Android
Code to go Android
 
Master cardapis v7.2020
Master cardapis v7.2020Master cardapis v7.2020
Master cardapis v7.2020
 
Master pass api
Master pass apiMaster pass api
Master pass api
 
Coding to the MasterCard OpenAPIs
Coding to the MasterCard OpenAPIsCoding to the MasterCard OpenAPIs
Coding to the MasterCard OpenAPIs
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 

Similar to Putting real feeling into Android Apps

201505 beena v0
201505 beena v0201505 beena v0
201505 beena v0Mohamedcpcbma
 
Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1Frank Pham
 
Drone sdk showdown
Drone sdk showdownDrone sdk showdown
Drone sdk showdownGodfrey Nolan
 
Android
AndroidAndroid
AndroidBVP GTUG
 
Gl android platform
Gl android platformGl android platform
Gl android platformPragya Rastogi
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGapDoncho Minkov
 
Introductory webinar on iRidium
Introductory webinar on iRidiumIntroductory webinar on iRidium
Introductory webinar on iRidiumiRidiumMobile365
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.pptBijayKc16
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.Sandeep Londhe
 
Internship presentation
Internship presentationInternship presentation
Internship presentationPrativa Neupane
 
Bird.pdf
 Bird.pdf Bird.pdf
Bird.pdfRebaMaheen
 
PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanOrisysIndia
 
Android installation
Android installationAndroid installation
Android installationDurai S
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Modifying Android Apps Without Source Code with Microsoft Visual Studio Code
Modifying Android Apps Without Source Code with Microsoft Visual Studio CodeModifying Android Apps Without Source Code with Microsoft Visual Studio Code
Modifying Android Apps Without Source Code with Microsoft Visual Studio CodeRonillo Ang
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas8neutron8
 

Similar to Putting real feeling into Android Apps (20)

201505 beena v0
201505 beena v0201505 beena v0
201505 beena v0
 
Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1
 
Drone sdk showdown
Drone sdk showdownDrone sdk showdown
Drone sdk showdown
 
Android
AndroidAndroid
Android
 
Mobile Web vs. Native Apps
Mobile Web vs. Native AppsMobile Web vs. Native Apps
Mobile Web vs. Native Apps
 
Gl android platform
Gl android platformGl android platform
Gl android platform
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGap
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 
Introductory webinar on iRidium
Introductory webinar on iRidiumIntroductory webinar on iRidium
Introductory webinar on iRidium
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
 
Internship presentation
Internship presentationInternship presentation
Internship presentation
 
Bird.pdf
 Bird.pdf Bird.pdf
Bird.pdf
 
PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J Krishnan
 
Android installation
Android installationAndroid installation
Android installation
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Modifying Android Apps Without Source Code with Microsoft Visual Studio Code
Modifying Android Apps Without Source Code with Microsoft Visual Studio CodeModifying Android Apps Without Source Code with Microsoft Visual Studio Code
Modifying Android Apps Without Source Code with Microsoft Visual Studio Code
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas
 
Android tio manual
Android tio manualAndroid tio manual
Android tio manual
 
Android tio manual
Android tio manualAndroid tio manual
Android tio manual
 

Recently uploaded

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your BudgetEnjoy Anytime
 

Recently uploaded (20)

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✹ 7001305949 ✹ Cheap Price Your Budget
 

Putting real feeling into Android Apps

  • 1. Peter van der Linden Android Technology Evangelist Jan 2014, Chicago NASDAQ: IMMR Putting Real Feeling Into Android apps! ©2012 Immersion Corporation–Confidential
  • 2. ■ Agenda 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 3. 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 4. The Mobile User ©2012 Immersion Corporation–Confidential 4
  • 6. Agency TBWANeboko Photo: Michael Harvey Touch feedback fills the human need for tactile gratification CBS News Photo: Walter Geis ©2012 Immersion Corporation–Confidential © 2011 Immersion Corporatio
  • 7. 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 8. Android API levels http://goo.gl/LuNCDG ©2012 Immersion Corporation–Confidential
  • 9. Choosing Android API levels It’s a tradeoff ‱  You want the oldest possible API because – more phones will run your app ‱  You want the newest possible API because – better quality, better performance, widest range of new features Review market share of different API levels http://goo.gl/219Br4 API level 14 is a good choice at present, but will fade out. ©2012 Immersion Corporation–Confidential
  • 10. Create new project - Exercise To create a new Android project in Eclipse 1. start Eclipse 2. select File > New > Project. 3. expand “Android”, then click > Android Application Project, and click Next. 4. enter Application Name: Hello. 5. Enter Project Name: Helloworld 7. Package name: com.example.helloworld. 6. Select Min Reqd SDK: “API 14 Android 4.0” 7. Select Target SDK: “API 14” 9. Compile with: ”API 19” or any >= 14 where you have downloaded that platform Then hit ”Next” 10. on “New Android App” uncheck “custom launcher icon”, click “Next” 11. on “Create Activity”, click “Next”. 12. Click Finish. ©2012 Immersion Corporation–Confidential
  • 11. Create new project step 2 - 3 2. select File > New > Project
 3. expand “Android”, click > Android Application Project, click Next. Running your Studio Project ©2012 Immersion Corporation–Confidential
  • 12. Create a new Android project ■  File > New > Android Project using Eclipse + ADT Field Purpose Project name What Eclipse calls this app Hello Target API level this app uses 14 App name what phone calls the app Hello Package name what Java calls the app com.example.hello Activity name The file containing main MainActivity Min SDK version API level this app uses Value to use 14 You must have installed the platform file for “target” and “minsdk” level that you choose. This is part of installing the Eclipse bundle. Platforms live in the SDK & have names like “platform-14” ©2012 Immersion Corporation–Confidential
  • 13. Create new project step 4 - 9 4. enter Application Name: Hello. 5. Enter Project Name: Helloworld 7. Package name: com.example.helloworld. 6. Select Min Reqd SDK: “API 14 Android 4.0” 7. Select Target SDK: “API 14” 9. Compile with: ”API 14” or any >= 14 where you have downloaded that platform Then hit ”Next” Running your Studio Project ©2012 Immersion Corporation–Confidential
  • 14. Create new project step 10 10. on “New Android App,” uncheck “custom launcher icon”, click “Next” Running your Studio Project ©2012 Immersion Corporation–Confidential
  • 15. Create new project step 11 11. on “Create Activity”, click “Next”. 12. Click Finish. Running your Studio Project ©2012 Immersion Corporation–Confidential
  • 16. Create new project step 12 12. Note the “Activity name” and “layout name” you were given. Click Finish. ©2012 Immersion Corporation–Confidential
  • 17. New 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
  • 18. 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 19. Downloading the Immersion Haptic Platform Immersion Haptic SDK Tools: www.immersion.com/haptic/sdk Â§ï‚§â€Ż Download the Haptic SDK (450KB) Â§ï‚§â€Ż Download the Haptic Studio (only for advanced custom effect design) Haptic Effects Quick Start Guide: www.immersion.com/haptic/guide Immersion Haptic Effect Preview App Â§ï‚§â€Ż Download FREE from Google Play ©2012 Immersion Corporation–Confidential 19
  • 20. Add Haptics to “Hello World!” Project ‱  Download UHL zip file ‱  Copy extracted libImmEmulatorJ.so file to libs/armeabi folder (create folders if necessary) ‱  Copy extracted UHL.jar to libs folder ©2012 Immersion Corporation–Confidential 2 0
  • 21. Add a Button in res/layout/activity_main.xml <Button TextView! android:text=”play effect!”! android:onClick="handleClick"! />! in src/
 MainActivity.java import android.view.View;! ! public void handleClick(View v) { }! ©2012 Immersion Corporation–Confidential 21
  • 23. Add Vibrate permission in top level AndroidManifest.xml <manifest xmlns:android= 
 />! ! <uses-permission! ! android:name="android.permission.VIBRATE" />! ! <application android:icon= ! <activity>! </activity>! </application>! ! </manifest>! ©2012 Immersion Corporation–Confidential 23
  • 24. Add Import Statement Import the UHL classes into your Activity in src/
 MainActivity.java import com.immersion.uhl.*;! ©2012 Immersion Corporation–Confidential 24
  • 25. Instantiate Launcher object in src/
 MainActivity.java public class MainActivity extends Activity {! ! Launcher haptic;! ! @Override! public void onCreate(Bundle b) {! super.onCreate(b);! haptic = new Launcher(this);! ©2012 Immersion Corporation–Confidential 25
  • 26. Use the Haptic Effect Preview App ©2012 Immersion Corporation–Confidential 26
  • 27. Play Effect public  sta+c Â ïŹnal  int  BOUNCE_100  =  0;      
   public  sta+c Â ïŹnal  int  EXPLOSION7=    79;   public  sta+c Â ïŹnal  int  ENGINE4_33  =  123; haptic.play(Launcher.EXPLOSION7);! ©2012 Immersion Corporation–Confidential 27
  • 28. Stop any rendering when app Pauses in src/
 MainActivity.java @Override! !protected void onPause() {! ! !super.onPause();! ! !haptic.stop();! !}! ©2012 Immersion Corporation–Confidential 28
  • 29. Harden the code try {! ! haptic.play(Launcher.EXPLOSION7);! ! } catch (RuntimeException e) {! Log.e(”MyTestApp", e.getMessage());! }! ©2012 Immersion Corporation–Confidential 29
  • 30. In a nutshell, that’s it! That’s all you need to put haptics in your app Now you can add cool pre-made haptic effects to your game applications. ©2012 Immersion Corporation–Confidential 30
  • 31. Immersion Haptic SDK Plugins Â§ï‚§â€Ż Unity3D plugin Â§ï‚§â€Ż Marmalade plugin Â§ï‚§â€Ż YoYo Games Plugins available at www.immersion.com/haptic/sdk ©2012 Immersion Corporation–Confidential 31
  • 32. 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 33. One time set up – using phone/tablet Eclipse ADT Eclipse plugin SDK Run As > Android Application workspace your app code platform library ©2012 Immersion Corporation–Confidential actual device
  • 34. One time set up – PHONE / TABLET Home > All Apps > Settings ‱  Applications > Development ‱  Click “USB Debugging” & “Stay awake” ‱  Different in Ice Cream Sandwich (Dev options) ‱  Different in Jelly Bean (Hidden! click “build num” 7x) actual device Pull down Notification Shade > USB Connection ‱  Click “Charge only”, “OK” Connect the device to your devt PC with a micro USB cable If using Windows, you need to install a driver on Windows. Get it from phone manufacturer’s developer website. ©2012 Immersion Corporation–Confidential
  • 35. Run app on phone / tablet ©2012 Immersion Corporation–Confidential
  • 36. 1 Haptics 2 Creating a new project 3 Linking to a 3rd party Library 4 Running your code on a phone 5 Wrap up ©2012 Immersion Corporation–Confidential
  • 37. Haptic Effect Preview App Â§ï‚§â€Ż Free app on Google Play Â§ï‚§â€Ż Feel each effect on any Android device Â§ï‚§â€Ż Code sample provided for each effect Â§ï‚§â€Ż Awesome on Android handsets with TouchSense installed by Samsung, LG, Toshiba, Pantech and others Â§ï‚§â€Ż Emulates effects on all other Android devices without the TouchSense technology –  Allows vibe effects not available with standard Google vibrate () method ©2012 Immersion Corporation–Confidential
  • 38. Connect with Immersion #HapticsDev like “ImmersionDeveloper” search “Immersion Corporation” ©2012 Immersion Corporation–Confidential
  • 39. Some great Android resources Â§ï‚§â€Ż http://developer.android.com Â§ï‚§â€Ż http://stackoverflow.com Â§ï‚§â€Ż Various meetups – Â§ï‚§â€Ż http://www.meetup.com/Android-Career-TrainingChicago/ Â§ï‚§â€Ż http://www.meetup.com/Newbie-Mobile-Developers/ Â§ï‚§â€Ż http://www.momochicago.org/ Â§ï‚§â€Ż http://www.meetup.com/chicago-google/ Â§ï‚§â€Ż Have a great time with this! ©2012 Immersion Corporation–Confidential
  • 40. Contact Us Hap+csDev@immersion.com   Like Us hNp://www.facebook.com/ImmersionDeveloper   Follow Us @Hap+csDev   Read Our Blog hNp://blog.immersion.com   Direct Access: Peter van der Linden plinden@immersion.com Bob Heubel rheubel@immersion.com ©2012 Immersion Corporation–Confidential 40