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

* commit '09cf0729a3b21e7106918cf3690e881a1860ae8b':
  docs: Fixed bugs for Auto docs.
This commit is contained in:
Quddus Chong
2014-11-18 22:17:53 +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>
<div class="landing-body"> <div class="landing-body">
<div class="cols"> <div class="cols">
<div class="col-4"> <div class="col-4">
<img src="/auto/images/logos/apps/kik.png" <img src="{@docRoot}auto/images/logos/apps/iheartradio.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"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </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"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/joyride.png" <img src="{@docRoot}auto/images/logos/apps/joyride.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </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"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/mlb.png" <img src="{@docRoot}auto/images/logos/apps/mlb.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </div>
</div>
<div class="cols">
<div class="col-4"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/pandora.png" <img src="{@docRoot}auto/images/logos/apps/pandora.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
@@ -259,25 +250,47 @@ page.type=about
<img src="{@docRoot}auto/images/logos/apps/pocketcasts.png" <img src="{@docRoot}auto/images/logos/apps/pocketcasts.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </div>
</div>
<div class="cols">
<div class="col-4"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/songza.png" <img src="{@docRoot}auto/images/logos/apps/songza.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </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"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/stitcher.png" <img src="{@docRoot}auto/images/logos/apps/stitcher.png"
width="160" height="160" class="img-logo" /> width="160" height="160" class="img-logo" />
</div> </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"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/tunein.png" <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>
<div class="col-4"> <div class="col-4">
<img src="{@docRoot}auto/images/logos/apps/umano.png" <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> </div>
<div class="cols" style="margin-top:40px"> <div class="cols" style="margin-top:40px">
<div class="col-4"> <div class="col-4">
<img src="/auto/images/logos/apps/whatsapp.png" <img src="/auto/images/logos/apps/whatsapp.png"
@@ -292,6 +305,7 @@ page.type=about
user-friendly and highly safety-minded."</em></p> user-friendly and highly safety-minded."</em></p>
</div> </div>
</div> </div>
<div class="cols" style="margin-top:60px"> <div class="cols" style="margin-top:60px">
<div class="col-4"> <div class="col-4">

View File

@@ -19,9 +19,9 @@ page.image=/distribute/images/gp-auto-quality.png
Core App Quality</a></li> Core App Quality</a></li>
<li><a href="{@docRoot}distribute/essentials/optimizing-your-app.html"> <li><a href="{@docRoot}distribute/essentials/optimizing-your-app.html">
Optimize Your App</a></li> 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> 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> for Messaging Applications</a></li>
</ol> </ol>
</div> </div>
@@ -310,7 +310,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
<p style="margin-bottom:.5em;"> <p style="margin-bottom:.5em;">
App has no more than four primary actions plus one optional action overflow toggle (or five if 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 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>. for Media Applications</a>.
</p> </p>
</td> </td>
@@ -324,7 +324,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
<p style="margin-bottom:.5em;"> <p style="margin-bottom:.5em;">
App has no more than four optional secondary actions plus one action overflow toggle. For more 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 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>. for Media Applications</a>.
</p> </p>
</td> </td>

View File

@@ -301,31 +301,30 @@ look like this:</p>
public BrowserRoot onGetRoot(String clientPackageName, int clientUid, public BrowserRoot onGetRoot(String clientPackageName, int clientUid,
Bundle rootHints) { Bundle rootHints) {
// Check the calling client to make sure it's one you approve. // To ensure you are not allowing any arbitrary app to browse your app's
// For example, to limit access to just Auto, the Auto emulator, // contents, you need to check the origin:
// and this app: if (!PackageValidator.isCallerAllowed(this, clientPackageName, clientUid)) {
if (!clientPackageName.equals("com.google.android.projection.gearhead") &amp;&amp;
!clientPackageName.equals("com.example.android.media") &amp;&amp;
!clientPackageName.equals(getApplication().getPackageName()) {
// If the request comes from an untrusted package, return null. // If the request comes from an untrusted package, return null.
// No further calls will be made to other media browsing methods. // No further calls will be made to other media browsing methods.
LogHelper.w(TAG, "OnGetRoot: IGNORING request from untrusted package "
+ clientPackageName);
return null; return null;
} }
if (ANDROID_AUTO_PACKAGE_NAME.equals(clientPackageName)) {
// Return a BrowserRoot. If you wish, you could have multiple BrowserRoot // Optional: if your app needs to adapt ads, music library or anything
// objects and return different ones depending on the calling client. // else that needs to run differently when connected to the car, this
// In this example, there's just a single BrowserRoot. // is where you should handle it.
return new BrowserRoot(MEDIA_BROWSER_ROOT, null);
} }
return new BrowserRoot(MEDIA_ID_ROOT, null);
}
</pre> </pre>
<p> <p>
The Auto device client builds the top-level menu by calling {@link The Auto device client builds the top-level menu by calling {@link
android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} with the root node android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()}
object and getting it's children. The client builds submenus by calling the same method with with the root node object and getting it's children. The client builds
other child nodes. The following example code shows a simple implementation of {@link 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: android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} method:
</p> </p>