am f256d7ac: am 4741fb4b: docs: Fixed bugs for Auto docs.

* commit 'f256d7ac189e58a6c21a5a71e5a1dddeab2d576f':
  docs: Fixed bugs for Auto docs.
This commit is contained in:
Quddus Chong
2014-11-18 22:13:06 +00:00
committed by Android Git Automerger
5 changed files with 55 additions and 42 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -223,34 +223,25 @@ page.type=about
</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"/>
</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 class="col-4">
<img src="/auto/images/logos/apps/iheartradio.png"
<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/spotify.png"
width="160" height="160" class="img-logo" />
</div>
</div>
<div class="cols">
<div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/joyride.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
<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="{@docRoot}auto/images/logos/apps/mlb.png"
width="160" height="160" class="img-logo" />
</div>
</div>
<div class="cols">
<div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/pandora.png"
width="160" height="160" class="img-logo" />
@@ -259,25 +250,47 @@ page.type=about
<img src="{@docRoot}auto/images/logos/apps/pocketcasts.png"
width="160" height="160" class="img-logo" />
</div>
</div>
<div class="cols">
<div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/songza.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
<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="/auto/images/logos/apps/spotify.png"
width="160" height="160" class="img-logo" />
</div>
<div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/stitcher.png"
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"
@@ -292,6 +305,7 @@ page.type=about
user-friendly and highly safety-minded."</em></p>
</div>
</div>
<div class="cols" style="margin-top:60px">
<div class="col-4">

View File

@@ -19,9 +19,9 @@ page.image=/distribute/images/gp-auto-quality.png
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>
@@ -310,7 +310,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
<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>
@@ -324,7 +324,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
<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>

View File

@@ -301,31 +301,30 @@ look like this:</p>
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") &amp;&amp;
!clientPackageName.equals("com.example.android.media") &amp;&amp;
!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>