Slide 1

Slide 1 text

Android Everywhere Your watch, your TV, your car, you fridge – the green robot is everywhere

Slide 2

Slide 2 text

. . . and soon on your toaster Well . . . Maybe quite not yet

Slide 3

Slide 3 text

Possibilities ? ? ?

Slide 4

Slide 4 text

Chrysler Jeep Hack Wired Magazine, July 2015 Charlie Miller and Chris Valasek Hacked a Chrysler Jeep and took control of steering and throttle. July, 2015 (Not using Android Auto)

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Well ok, it’s not that bad yet.

Slide 7

Slide 7 text

Android Auto Arnav Gupta

Slide 8

Slide 8 text

Android Auto Onboarding Process

Slide 9

Slide 9 text

Android Auto Onboarding Process

Slide 10

Slide 10 text

Android Auto Onboarding Process

Slide 11

Slide 11 text

Android Auto Onboarding Process

Slide 12

Slide 12 text

Android Auto Onboarding Process

Slide 13

Slide 13 text

Android Auto Basic UI Components Open Maps

Slide 14

Slide 14 text

Android Auto Basic UI Components Open Maps Open Dialer

Slide 15

Slide 15 text

Android Auto Basic UI Components Open Maps Open Dialer Home/Notifications

Slide 16

Slide 16 text

Android Auto Basic UI Components Open Maps Open Dialer Home/Notifications Music

Slide 17

Slide 17 text

Android Auto Basic UI Components Open Maps Open Dialer Home/Notifications Music Back to Dash

Slide 18

Slide 18 text

Android Auto Architecture Head Unit Screen

Slide 19

Slide 19 text

Android Auto Architecture Audio Head Unit Screen

Slide 20

Slide 20 text

Android Auto Architecture OBD CAN Audio Head Unit Screen

Slide 21

Slide 21 text

Android Auto Architecture OBD CAN Audio Head Unit Screen Touch + Keys

Slide 22

Slide 22 text

Android Auto Architecture Smartphone OBD CAN Audio Head Unit Screen Touch + Keys

Slide 23

Slide 23 text

Android Auto Architecture Smartphone OBD CAN Rendered Screen Audio Head Unit Screen Touch + Keys

Slide 24

Slide 24 text

Android Auto Architecture Smartphone OBD CAN Sensor | Touchpoint Rendered Screen Audio Head Unit Screen Touch + Keys

Slide 25

Slide 25 text

Building Apps for Android Auto š Right now – only two types of Apps : š Audio Apps – Playback to car’s audio system š Messaging Apps – Text communication using voice commands š Android Auto v1 Does not have OBD/CAN bus data available in an API š Cannot control anything other than audio/video output for now

Slide 26

Slide 26 text

Building Apps for Android Auto š targetSdkVersion >= 21 š minSdkVersion >= 21 š Does NOT work with Lollipop phones š Needs Android v4 Support Library

Slide 27

Slide 27 text

Automotive Description XML

Slide 28

Slide 28 text

Add meta to Manifest

Slide 29

Slide 29 text

Add an Icon

Slide 30

Slide 30 text

Designing for Android Auto Upside-down approach. Keep the user away

Slide 31

Slide 31 text

Designing for Android Auto š Simple UI š Large buttons š Max depth = 6

Slide 32

Slide 32 text

Designing for Android Auto š Simple UI š Large buttons š Max depth = 6 š No ”BACK” button

Slide 33

Slide 33 text

Designing for Android Auto š Simple UI š Large buttons š Max depth = 6 š No ”BACK” button

Slide 34

Slide 34 text

Distraction Free Design š More options = more car accidents š Small buttons = more accidents š Low contrast = more accidents š Scrolling = more accidents š Video/Picture ads = u kidding bro ?

Slide 35

Slide 35 text

The navigation activity bar

Slide 36

Slide 36 text

The navigation activity bar š Buttons – š Navigation š Communication š Home š Media š Car Dash š Single tap = default app, Double tap = optional apps

Slide 37

Slide 37 text

Google Now Demand Layer

Slide 38

Slide 38 text

The notification home screen

Slide 39

Slide 39 text

Anatomy of Home Cards

Slide 40

Slide 40 text

Nav Drawers – It’s in landscape now

Slide 41

Slide 41 text

Nav Drawers - Categories and Icons

Slide 42

Slide 42 text

Notifications

Slide 43

Slide 43 text

Testing Android Auto š Buy a Rs. 14 lakh car you cheapass !!!

Slide 44

Slide 44 text

Testing Android Auto š Buy a Rs. 14 lakh car you cheapass !!!

Slide 45

Slide 45 text

Testing Android Auto š Buy a Rs. 14 lakh car you cheapass !!!

Slide 46

Slide 46 text

Testing Android Auto š Install the Android “Desktop Head Unit Simulator” in Android SDK š Install the “Android Auto App” on your Phone š Connect phone to PC

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Testing Android Auto š adb forward tcp:5277 tcp:5277 š cd /extras/google/auto š ./desktop-head-unit

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Android Auto Audio Apps MediaBrowserService API UI Guidelines

Slide 51

Slide 51 text

Extend MediaBrowserSerivce public class MyMusicService extends MediaBrowserService {

Slide 52

Slide 52 text

Add your Service to Manifest

Slide 53

Slide 53 text

Register a session for Playback @Override public void onCreate() { super.onCreate(); mSession = new MediaSession(this, "MyMusicService"); setSessionToken(mSession.getSessionToken()); mSession.setCallback(new MediaSessionCallback()); mSession.setFlags(MediaSession.FLAG_HANDLES_MEDIA_BUTTONS | MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS); }

Slide 54

Slide 54 text

More Actions in Action Cards

Slide 55

Slide 55 text

Shallow Navigation Do this

Slide 56

Slide 56 text

Deep Navigation Don’t do this

Slide 57

Slide 57 text

Queue Screen Large clickable sections

Slide 58

Slide 58 text

Android Auto Messaging Apps MessagingService API UI Guidelines

Slide 59

Slide 59 text

Create Receivers and Service public class MessageReadReceiver extends BroadcastReceiver { … } public class MessageReplyReceiver extends BroadcastReceiver { … } public class MyMessagingService extends Service { … }

Slide 60

Slide 60 text

Register them

Slide 61

Slide 61 text

When message arrives @Override public void onReceive(Context context, Intent intent) { if (MyMessagingService.READ_ACTION.equals(intent.getAction())) { int conversationId = intent.getIntExtra(MyMessagingService.CONVERSATION_ID, -1); if (conversationId != -1) { Log.d(TAG, "Conversation " + conversationId + " was read"); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); notificationManager.cancel(conversationId); } } }

Slide 62

Slide 62 text

When user replies @Override public void onReceive(Context context, Intent intent) { if (MyMessagingService.REPLY_ACTION.equals(intent.getAction())) { int conversationId = intent.getIntExtra(MyMessagingService.CONVERSATION_ID, -1); CharSequence reply = getMessageText(intent); Log.d(TAG, "Got reply (" + reply + ") for ConversationId " + conversationId); } }

Slide 63

Slide 63 text

Get the user’s reply text from voice private CharSequence getMessageText(Intent intent) { Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); if (remoteInput != null) { return remoteInput.getCharSequence(MyMessagingService.EXTRA_VOICE_REP LY); } return null; }

Slide 64

Slide 64 text

Create handler in Service class IncomingHandler extends Handler { @Override public void handleMessage(Message msg) { sendNotification(1, "This is a sample message", "John Doe", System.currentTimeMillis()); } }

Slide 65

Slide 65 text

Start read receiver from Service // A pending Intent for reads PendingIntent readPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), conversationId, createIntent(conversationId, READ_ACTION), PendingIntent.FLAG_UPDATE_CURRENT);

Slide 66

Slide 66 text

Start reply receiver from Service // Building a Pending Intent for the reply action to trigger PendingIntent replyIntent = PendingIntent.getBroadcast(getApplicationContext(), conversationId, createIntent(conversationId, REPLY_ACTION), PendingIntent.FLAG_UPDATE_CURRENT);

Slide 67

Slide 67 text

Create notifications on the home screen NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext()) //.setSmallIcon(R.drawable.notification_icon) //.setLargeIcon(personBitmap) .setContentText(message) .setWhen(timestamp) .setContentTitle(participant) .setContentIntent(readPendingIntent) .extend(new CarExtender() .setUnreadConversation(unreadConvBuilder.build())); mNotificationManager.notify(conversationId, builder.build());

Slide 68

Slide 68 text

What happens when you get a message ?

Slide 69

Slide 69 text

What happens when you get a message ?

Slide 70

Slide 70 text

Day and Night Coloring Modes Because you can’t use it if you can’t see it

Slide 71

Slide 71 text

Day and Night Coloring Modes Because it’s a car dashboard, not a headlight inside the car

Slide 72

Slide 72 text

Day Mode

Slide 73

Slide 73 text

Night Mode

Slide 74

Slide 74 text

Some words of advice That you all will chose to ignore

Slide 75

Slide 75 text

Eyes > Google Maps

Slide 76

Slide 76 text

Driving > Replying

Slide 77

Slide 77 text

Your phone renders an external display

Slide 78

Slide 78 text

Read More Android Auto resources from Google http://andriod.com/auto https://developer.android.com /training/auto https://github.com/googlesam ples/android-MessagingService https://github.com/googlesam ples/android- MediaBrowserService

Slide 79

Slide 79 text

Thank You ! [email protected] twitter.com/championswimmer github.com/championswimmer