ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Android Wear &
Cardboard
Marc Lester Tan
Mobility Innovation Center, SAP
marctan.com
LG G Watch Samsung Gear Live Moto 360
Writing Wear Apps
¡ñ Add notifications to existing apps
¡ñ Native applications
¡ñ Watchface
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());
Native Applications
¡ñ Use Android Studio
¡ñ Android 4.4 KitKat Wear
(API 20)
¡ñ Separate modules for
mobile & wear devices
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>
Watchface API
¡ñ Create watch faces
¡ñ Uses Broadcast Receiver for
ACTION_TIME_TICK
¡ñ Uses DisplayManager for
dimmed state
¡ñ Unofficial API and
discouraged by Google
DisplayManager
public void onDisplayChanged(int displayId) {
switch(displayManager.getDisplay(displayId).getState()){
case Display.STATE_DOZING:
case Display.STATE_OFF:
default:
}
}
Google Cardboard
¡ñ Biconvex Lenses
¡ñ Cardboard
¡ñ Rubber Band
¡ñ Velcro
¡ñ NFC Tags (optional)
¡ñ Neodynium Magnet and
Ceramic Disk Magnet
Cardboard VR Toolkit
Cardboard VR Toolkit
¡ñ OpenGL
¡ñ Uses magnetometer for
input
¡ñ Magnet renders the
compass unusable
¡ñ Experimental
Questions?

More Related Content

Android wear and Cardboard