Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09cf0729 authored by Quddus Chong's avatar Quddus Chong Committed by Android Git Automerger
Browse files

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

* commit 'f256d7ac':
  docs: Fixed bugs for Auto docs.
parents 8f7b84e0 f256d7ac
Loading
Loading
Loading
Loading
+317 KiB
Loading image diff...
+5.08 KiB
Loading image diff...
+31 −17
Original line number Diff line number Diff line
@@ -223,61 +223,74 @@ 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"/>
              <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">
              <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">
+4 −4
Original line number Diff line number Diff line
@@ -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>
+16 −17
Original line number Diff line number Diff line
@@ -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>