12
Android Wear & Cardboard Marc Lester Tan Mobility Innovation Center, SAP marctan.com

Android wear and Cardboard

  • Upload
    mharkus

  • View
    844

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Android wear and Cardboard

Android Wear & Cardboard

Marc Lester TanMobility Innovation Center, SAPmarctan.com

Page 2: Android wear and Cardboard

LG G Watch Samsung Gear Live Moto 360

Page 3: Android wear and Cardboard

Writing Wear Apps● Add notifications to existing apps● Native applications● Watchface

Page 4: Android wear and Cardboard

Notifications

NotificationCompat.Builder builder = new NotificationCompat.Builder(this) .setContentTitle(“some title”) .setContentText(“Lorem ipsum dolor...”) .setContentIntent(pendingIntent);

NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);notificationManager.notify(id, builder.build());

Page 5: Android wear and Cardboard

Native Applications

● Use Android Studio● Android 4.4 KitKat Wear

(API 20)● Separate modules for

mobile & wear devices

Page 6: Android wear and Cardboard

Native Applications

<?xml version="1.0" encoding="utf-8"?><android.support.wearable.view.WatchViewStub …. app:rectLayout="@layout/rect_activity" app:roundLayout="@layout/round_activity"></android.support.wearable.view.WatchViewStub>

Page 7: Android wear and Cardboard

Watchface API● Create watch faces ● Uses Broadcast Receiver for

ACTION_TIME_TICK● Uses DisplayManager for

dimmed state● Unofficial API and

discouraged by Google

Page 8: Android wear and Cardboard

DisplayManagerpublic void onDisplayChanged(int displayId) { switch(displayManager.getDisplay(displayId).getState()){ case Display.STATE_DOZING: case Display.STATE_OFF: default: } }

Page 9: Android wear and Cardboard

Google Cardboard● Biconvex Lenses● Cardboard● Rubber Band● Velcro● NFC Tags (optional)● Neodynium Magnet and

Ceramic Disk Magnet

Page 10: Android wear and Cardboard

Cardboard VR Toolkit

Page 11: Android wear and Cardboard

Cardboard VR Toolkit

● OpenGL● Uses magnetometer for

input● Magnet renders the

compass unusable● Experimental

Page 12: Android wear and Cardboard

Questions?