39
©2011 Immersion Corporation–Confidential 1 NASDAQ: IMMR Creating custom haptic effects for your Android application September 2011 Bob Heubel & Richard Mar presenting

WIP Back to School Webinars - Creating Your Own Haptic Effects

Embed Size (px)

Citation preview

Page 1: WIP  Back to School Webinars - Creating Your Own Haptic Effects

©2011 Immersion Corporation–Confidential1

NASDAQ: IMMR

Creating custom haptic effects for your Android application

September 2011

Bob Heubel & Richard Mar presenting

Page 2: WIP  Back to School Webinars - Creating Your Own Haptic Effects

2©2011 Immersion Corporation–Confidential

Agenda – We will answer these questions: Who is Immersion? What is haptics? How can Haptics be applied to Android apps? What is Immersion’s MOTIV Platform for

Android? How do you design custom Haptic effects

using MOTIV Studio? How do you code these custom effects into

your Android application? Where do you find additional MOTIV

resources? What is the meaning of life? (time permitting)

Page 3: WIP  Back to School Webinars - Creating Your Own Haptic Effects

3©2011 Immersion Corporation–Confidential

Before we start, you should...

As an experienced Android developer, you should have these tools installed on your machine:

Java SE Eclipse Android SDK Android Developer Tools

And you should have an Android device connected

Page 4: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Additionally, you will need… Download latest Immersion MOTIV Studio and MOTIV

UHL to your PC from: http://www.immersion.com/MOTIVsdk

Download the latest MOTIV Bridge app from the Android Market to connect your device to MOTIV Studio: https://market.android.com/details?id=com.immersion.designerbridge

©2011 Immersion Corporation–Confidential4

Page 5: WIP  Back to School Webinars - Creating Your Own Haptic Effects

5©2011 Immersion Corporation–Confidential

Who is Immersion?

Page 6: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Company Highlights

3

Immersion: The Haptics Company

Worldwide Support – Offices in EU, Korea, Taiwan,

Japan, US & Canada

World Class Customer Base

Samsung, Nokia, LG, Sony, Microsoft,

Logitech, Lexus, BMW, CAE…

Established in Large andRapidly Growing Markets

– Our tech is in 750+ million devices– Mobile phones, game controllers, auto,

industrial, casino, other portable devices

Strong Intellectual Property

Portfolio of 1,200+ granted and pending patents in the field of Haptics related to both hardware and software

Technology LeaderDeveloping haptics

solutions since 1993

NASDAQ: IMMR

©2011 Immersion Corporation–Confidential

Page 7: WIP  Back to School Webinars - Creating Your Own Haptic Effects

7©2011 Immersion Corporation–Confidential

What is haptics?

Page 8: WIP  Back to School Webinars - Creating Your Own Haptic Effects

8©2011 Immersion Corporation–Confidential

The science of Haptics

Haptic interfaces simulate real-world forces

Feeling a real

bump on a surface

Feeling a Haptic

simulation of a bump

on a surface

Vs.

Haptics is the science concerned with how people explore their environment through their sense of touch (tactile feedback)

Page 9: WIP  Back to School Webinars - Creating Your Own Haptic Effects

9©2011 Immersion Corporation–Confidential

The science of Haptics Role of touch is often underestimated. We rely

extensively on touch to perform many tasks, like:– Controlling the movement of objects including our own bodies– Perceiving the world around us through the objects we interact

with

Haptic interactions rely on mechanical signals like:– Applied forces– Applied torques– Movement of objects– Geometry and mass of objects– Stiffness and texture of materials

Haptic interfaces use actuators (motors) to create haptic sensations that simulate real-world interactions

Page 10: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Common Haptic device examples

10©2011 Immersion Corporation–Confidential

Force-feedback and rumble feedback gaming

Page 11: WIP  Back to School Webinars - Creating Your Own Haptic Effects

11

©2011 Immersion Corporation–Confidential

The Benefits of Haptics Provides an enhanced user-experience that is more

engaging, intuitive and personal On touchscreen devices, Haptics assists in hand-eye

coordination--confirming task or data input completion or acceptance by the UI elements

More fun for gaming and entertainment apps Opens up a new communication channel that can be

used with or without audio or visual cues...– Example, using vibe patterns to identify callers without

use of sound.– Example, using vibe patterns to as navi-cues to

navigate while walking through the city, without the need for looking at your handset GPS map.

Page 12: WIP  Back to School Webinars - Creating Your Own Haptic Effects

12

©2011 Immersion Corporation–Confidential

Virtual keypads & keyboards that feel like mechanical

buttons

“Enzo’s Pinball” by Haptify let’s you feel the pinball collisions, bumpers & flippers

“Solo” by Coding Caveman lets you feel each string of the guitar as you

strum

More Examples of Applied Haptics

Page 13: WIP  Back to School Webinars - Creating Your Own Haptic Effects

13

©2011 Immersion Corporation–Confidential

Immersion’s Haptic Technologiesfor the Android Platform

Page 14: WIP  Back to School Webinars - Creating Your Own Haptic Effects

14

©2011 Immersion Corporation–Confidential

Immersion’s Haptic technologies Developer tools and resources (MOTIV SDK) that

include the MOTIV Studio effect design tool, the only Haptic design tool with a simple visual GUI

MOTIV Universal Haptic Layer (UHL) that contains a library of 124 pre-made Haptic effects

Software emulator included with MOTIV UHL that allows for a consistent haptic playback experience across all Android devices

Embedded software player technology (TouchSense) for OEMs to use that allows the highest quality Haptic playback possible

Page 15: WIP  Back to School Webinars - Creating Your Own Haptic Effects

15

©2011 Immersion Corporation–Confidential

What does the MOTIV Studio do for you? Allows you to design custom Haptic effects

beyond the pre-made 124 effects found in the MOTIV UHL

Allows you to create complex Timelines with multiple vibe components

Allows you to playback/test/iterate your effects on your tethered Android device without needing to compile code

Allows you to reference sounds files displayed as waveforms for playback with your newly designed effects, again, without having to compile your app code

Allows you to export your custom effects in many different developer formats, including Java

Page 16: WIP  Back to School Webinars - Creating Your Own Haptic Effects

What does the MOTIV SDK do for you? Saves you time developing effects that feel

good across all Android devices and platforms, not just a single device or platform version (1.6 or higher)

Allows you to have more than simple motor on/off vibration control, like ramps, staccato repeats and complicated patterns

Consistent vibe effects across ALL Android devices. Devices with TouchSense embedded player

technology will feel the best (1/4 billion devices to date) but the MOTIV UHL emulator creates compatibility support on all other Android devices. Code once!

16©2011 Immersion Corporation–Confidential

Page 17: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Example – Benefits of MOTIV SDK Using standard Google vibrate () you must

define motor “on” durations for each device type– Not useful, not effective for gaming– Very time consuming to code– Your effect may feel fine on one Android device but

horrible on another, due to differences in vibe motors

Using MOTIV, we abstract this level for you – You choose an effect from a library, or design your

own– The effect will automatically feel consistent across

all devices whether it is an explosion, click, or bounce

– The MOTIV Studio & MOTIV UHL combine to give you the only complete Haptic solution for the Android platform

17©2011 Immersion Corporation–Confidential

Page 18: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Adding MOTIV Haptics to an Android application

SDK and Studio available at: www.immersion.com/MOTIVsdk

MOTIV Bridge: https://market.android.com/details?id=com.immersion.designerbridge

Page 19: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Use MOTIV Studio in tandem with UHLYou should always use your custom created

Haptic effects from MOTIV Studio WITH the MOTIV UHL

If you do not, your custom effects will only playback on Android devices using the Immersion TouchSense player (about half the Android devices)

The MOTIV UHL contains the playback emulator needed to play your custom effects across ALL Android devices, not just those with TouchSense.

19©2011 Immersion Corporation–Confidential

Page 20: WIP  Back to School Webinars - Creating Your Own Haptic Effects

20

©2011 Immersion Corporation–Confidential

Using ImmersionMOTIV Studio

Page 21: WIP  Back to School Webinars - Creating Your Own Haptic Effects

21

©2011 Immersion Corporation–Confidential

Let’s start with an application in mind

We will design three custom effects

We will reference sound files in our design

We will create both simple basis effects and a more complicated timeline effect

We will export our effects as Java

We will add these effects to our sample application

Airplane crash animation

Page 22: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Airplane Crash animation example

22

Page 23: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Download resources… If you have not already, download latest Immersion

MOTIV Studio and MOTIV UHL to your PC from: http://www.immersion.com/MOTIVsdk

Download the latest MOTIV Bridge app from the Android Market to connect your device to MOTIV Studio: https://market.android.com/details?id=com.immersion.designerbridge

©2011 Immersion Corporation–Confidential23

Page 24: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Connecting your device toMOTIV Studio Install MOTIV Studio on your PC and make sure you

have the MOTIV Bridge app loaded on your target Android device

Make sure you have your Android device driver installed Turn on your device and enable the USB debugging

mode under your device “Application settings” menu Plug your device into your PC and use “adb devices”

command in your DOS prompt to verify that your device is being recognized by your PC. Once it is, you can launch the MOTIV Studio and your device should be recognized in the Studio device list

©2011 Immersion Corporation–Confidential24

Page 25: WIP  Back to School Webinars - Creating Your Own Haptic Effects

25

©2011 Immersion Corporation–Confidential

MOTIV Studio Effect Design

Page 26: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Exported Java from MOTIV Studio

26

These are the three effects we will call from our sample application

Page 27: WIP  Back to School Webinars - Creating Your Own Haptic Effects

27

©2011 Immersion Corporation–Confidential

Code Demo:

Integrating MOTIV Studio custom effects into the Airplane Crash

sample Android application

Page 28: WIP  Back to School Webinars - Creating Your Own Haptic Effects

28

©2011 Immersion Corporation–Confidential

You should... As an experienced Android developer, you

should have practical experience with Eclipse and:

Android architecture The life cycle of components Event handling Debugging and application Deploying an application to a device

Page 29: WIP  Back to School Webinars - Creating Your Own Haptic Effects

For additional information, visit the Immersion website: http://www2.immersion.com/developers/index.php?option=com_content&view=article&id=495&Itemid=812

Add UHL to Eclipse project

• Extract UHL_x_x_xx.zip somewhere• Copy extracted libImmEmulatorJ.so file to your Eclipse

project libs/armeabi folder (create folders if necessary)• In Eclipse, refresh project to see

libs/armeabi/libImmEmulatorJ.so• Navigate to Project > Properties > Build Path >

Configure Build Path…• Click on Add External JARs…• Browse to location of extracted UHL.jar file

©2011 Immersion Corporation–Confidential29

Page 30: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Create a Device Object This is a logical representation of the vibe capability of your

device. The Device object needs the context of the app as an argument

Device = Device.newDevice(context);

Create IVTBuffer Object• The IVTBuffer object stores all the IVT data from the effect

definition class into a temporary buffer. You must pass the byte array of the java class you exported from MOTIV Studio as an argument to the IVTBuffer constructor.

IVTBuffer ivt = new IVTBuffer(myeffects.ivt);

©2011 Immersion Corporation–Confidential30

Page 31: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Play Effect Play a haptic effect from the IVT

device.playIVTEffect(ivt, myeffects.Periodic);

Once the Device and IVTBuffer objects are created and initialized, you can play the actual effect by using the playIVTEffect() method.Since one IVTBuffer may contain many effects, an effect index is used to identify the one you wish to play.In the exported Java code, the effect indices are stored as constants. You determine the names of the effects by looking at the Java code.

Page 32: WIP  Back to School Webinars - Creating Your Own Haptic Effects

32

Stop Effect• Stop the haptic effect from the IVT.

device.stopAllPlayingEffects();

Close the Device Object

device.close();

The Device must be closed after it has been used to play and stop the haptic effects. This ensures that there are no resource leaks in the application.

Page 33: WIP  Back to School Webinars - Creating Your Own Haptic Effects

In a nutshell, that’s it!If you can handle the setting up your Eclipse

environment and understand the last five slides…

Then you should be able to add your cool custom MOTIV Studio effects to your applications.

But let’s review the steps within the Eclipse environment itself through the simple Airplane Crash demo application just to make sure you understand.

33

Page 34: WIP  Back to School Webinars - Creating Your Own Haptic Effects

34

©2011 Immersion Corporation–Confidential

Airplane CrashDemo App Example(within Eclipse)

Page 35: WIP  Back to School Webinars - Creating Your Own Haptic Effects

35

©2011 Immersion Corporation–Confidential

Agenda – We will answer these questions: Who is Immersion? What is haptics? How can Haptics be applied to Android apps? What is Immersion’s MOTIV Platform for

Android? How do you design custom Haptic effects

using MOTIV Studio? How do you code these custom effects into

your Android application? Where do you find additional MOTIV

resources?

Page 36: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Additional Resources http://www.immersion.com/MOTIVsdk

Developer guidehttp://www.immersion.com/MOTIVguide

Reference dochttp://www.immersion.com/MOTIVref

Sample codehttp://www.immersion.com/MOTIVcode

Forumhttp://www.immersion.com/MOTIVforum

MOTIV Studio (Only for advanced custom effect design)http://www.immersion.com/MOTIVsdk

.

Page 37: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Immersion’s Got Apps Campaign

Immersion Building a Wall of Haptic Apps for Mobile World Congress (MWC ‘12) in Barcelona, Spain.– Show us your apps using the Immersion MOTIV UHL

SDK and add “Integrated with Immersion MOTIV Haptic Effects” to your description page

– Launch in Android Market or any other Android app store

– If your app is compelling, we’ll help you promote it and demo it at Mobile World Congress – Feb 2012 and other tradeshows

– AND drive connection to our OEM / Carrier partners Contact us at [email protected] to

participate

37

Page 38: WIP  Back to School Webinars - Creating Your Own Haptic Effects

Immersion to Promo Your Cool Haptic Apps

Inclusion in Immersion’s outreach to over 30 major technology & review channels including:– Engadget, PC World, AndroidPolice, Appolicious,

VentureBeat/GameBeat, Android Central, etc…

Highlight of your app in Immersion’s Feature App section of their Developer’s site (developer.immersion.com)

Inclusion in Immersion’s publicly issued press releases

Potential inclusion on Immersion promotional videos/animations

Demos to Immersion’s major OEM partners for bundling opportunties

Inclusion in Immersion demonstrations at upcoming tradeshows and conferences like AnDevCon, MWC, etc.

38©2011 Immersion Corporation–Confidential

Page 39: WIP  Back to School Webinars - Creating Your Own Haptic Effects

39

©2011 Immersion Corporation–Confidential

Thank you!

NASDAQ: IMMR

September 2011

Bob Heubel & Richard Mar presenting