</div>
<div class="landing-body">
<div class="cols">
-
<div class="col-4">
- <img src="/auto/images/logos/apps/kik.png"
- width="120" height="120" class="img-logo" style="margin-top:20px"/>
+ <img src="{@docRoot}auto/images/logos/apps/iheartradio.png"
+ width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
- <img src="/auto/images/logos/apps/textplus.png"
- width="120" height="24" class="img-logo" style="margin-top:70px" />
+ <img src="{@docRoot}auto/images/logos/apps/joyride.png"
+ width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
- <img src="/auto/images/logos/apps/iheartradio.png"
- width="160" height="160" class="img-logo" />
+ <img src="{@docRoot}auto/images/logos/apps/kik.png"
+ width="120" height="120" class="img-logo" style="margin-top:30px" />
</div>
<div class="col-4">
- <img src="/auto/images/logos/apps/spotify.png"
+ <img src="{@docRoot}auto/images/logos/apps/mlb.png"
width="160" height="160" class="img-logo" />
</div>
</div>
- <div class="cols">
+ <div class="cols">
<div class="col-4">
- <img src="{@docRoot}auto/images/logos/apps/joyride.png"
+ <img src="{@docRoot}auto/images/logos/apps/pandora.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
- <img src="{@docRoot}auto/images/logos/apps/mlb.png"
+ <img src="{@docRoot}auto/images/logos/apps/pocketcasts.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
- <img src="{@docRoot}auto/images/logos/apps/pandora.png"
+ <img src="{@docRoot}auto/images/logos/apps/songza.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
- <img src="{@docRoot}auto/images/logos/apps/pocketcasts.png"
- width="160" height="160" class="img-logo" />
+ <img src="/auto/images/logos/apps/soundcloud.png"
+ width="100" height="100" class="img-logo"
+ style="margin-top:30px" />
</div>
</div>
+
<div class="cols">
<div class="col-4">
- <img src="{@docRoot}auto/images/logos/apps/songza.png"
+ <img src="/auto/images/logos/apps/spotify.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
+ <img src="/auto/images/logos/apps/TextMe.png"
+ width="100" height="100" class="img-logo" style="margin-top:30px" />
+ </div>
+ <div class="col-4">
+ <img src="/auto/images/logos/apps/textplus.png"
+ width="120" height="24" class="img-logo" style="margin-top:70px" />
+ </div>
+ </div>
+
+ <div class="cols">
+ <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/tunein.png"
- width="160" height="160" class="img-logo" />
+ width="160" height="160" class="img-logo" style="margin-left:160px" />
</div>
<div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/umano.png"
- width="160" height="160" class="img-logo" />
+ width="160" height="160" class="img-logo" style="margin-left:370px" />
</div>
</div>
+
<div class="cols" style="margin-top:40px">
<div class="col-4">
<img src="/auto/images/logos/apps/whatsapp.png"
user-friendly and highly safety-minded."</em></p>
</div>
</div>
+
<div class="cols" style="margin-top:60px">
<div class="col-4">
Core App Quality</a></li>
<li><a href="{@docRoot}distribute/essentials/optimizing-your-app.html">
Optimize Your App</a></li>
- <li><a href="{@docRoot}/shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
+ <li><a href="{@docRoot}shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
for Media Applications</a></li>
- <li><a href="{@docRoot}/shareables/auto/AndroidAuto-messaging-apps.pdf">Android Auto UX Guidelines
+ <li><a href="{@docRoot}shareables/auto/AndroidAuto-messaging-apps.pdf">Android Auto UX Guidelines
for Messaging Applications</a></li>
</ol>
</div>
<p style="margin-bottom:.5em;">
App has no more than four primary actions plus one optional action overflow toggle (or five if
no action overflow is used). For more information, see details on the media control card in the
- <a href="{@docRoot}/shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
+ <a href="{@docRoot}shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
for Media Applications</a>.
</p>
</td>
<p style="margin-bottom:.5em;">
App has no more than four optional secondary actions plus one action overflow toggle. For more
information, see details on the media control card in the
- <a href="{@docRoot}/shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
+ <a href="{@docRoot}shareables/auto/AndroidAuto-media-apps.pdf">Android Auto UX Guidelines
for Media Applications</a>.
</p>
</td>
public BrowserRoot onGetRoot(String clientPackageName, int clientUid,
Bundle rootHints) {
- // Check the calling client to make sure it's one you approve.
- // For example, to limit access to just Auto, the Auto emulator,
- // and this app:
-
- if (!clientPackageName.equals("com.google.android.projection.gearhead") &&
- !clientPackageName.equals("com.example.android.media") &&
- !clientPackageName.equals(getApplication().getPackageName()) {
-
+ // To ensure you are not allowing any arbitrary app to browse your app's
+ // contents, you need to check the origin:
+ if (!PackageValidator.isCallerAllowed(this, clientPackageName, clientUid)) {
// If the request comes from an untrusted package, return null.
// No further calls will be made to other media browsing methods.
+ LogHelper.w(TAG, "OnGetRoot: IGNORING request from untrusted package "
+ + clientPackageName);
return null;
- }
-
- // Return a BrowserRoot. If you wish, you could have multiple BrowserRoot
- // objects and return different ones depending on the calling client.
- // In this example, there's just a single BrowserRoot.
- return new BrowserRoot(MEDIA_BROWSER_ROOT, null);
}
+ if (ANDROID_AUTO_PACKAGE_NAME.equals(clientPackageName)) {
+ // Optional: if your app needs to adapt ads, music library or anything
+ // else that needs to run differently when connected to the car, this
+ // is where you should handle it.
+ }
+ return new BrowserRoot(MEDIA_ID_ROOT, null);
+}
</pre>
<p>
The Auto device client builds the top-level menu by calling {@link
- android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} with the root node
- object and getting it's children. The client builds submenus by calling the same method with
- other child nodes. The following example code shows a simple implementation of {@link
+ android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()}
+ with the root node object and getting it's children. The client builds
+ submenus by calling the same method with other child nodes. The following
+ example code shows a simple implementation of {@link
android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} method:
</p>