blob: 0a0f9c910e8a66fd40e8bc5731682a29b3d8a855 [file] [log] [blame]
<h1>Getting Started with ARC</h1>
<p>
The App Runtime for Chrome (Beta), or ARC, lets you run your favorite
Android apps on Chrome OS. By following these steps, you can try out the <a
href="http://goo.gl/pkt6HV">App Runtime for Chrome (Beta)</a> during this
Developer Preview.
</p>
<p>
To test your app, you need three things:
<ol>
<li> Your APK. </li>
<li> PC, Mac, Linux, or Chromebook on Chrome Version 41+. </li>
<li> <a href="http://goo.gl/gAn0Xh">The ARC Welder app</a>. </li>
</ol>
</p>
<h2 id="test">Test your app</h2>
<p>
Open ARC Welder, attach your APK, and select your options. Click <strong>Launch
App</strong> to test your app. When testing, <a href="http://goo.gl/4b9rEz">file
a bug</a> if something doesn't work, or
<a href="http://stackoverflow.com/questions/tagged/google-chrome-arc">find us
on Stack Overflow</a> (tag: google-chrome-arc) for help.
</p>
<h2 id="upload">Upload your app</h2>
<p>
In ARC Welder, click <strong>Download ZIP</strong>. Upload your ZIP file to the
Chrome Web Store. See <a href="/webstore/publish">Publishing Your App</a> for
more details.
</p>
<h2 id="bestpractices">Best practices</h2>
<p>
When testing your APK on ARC, developers have passed along these helpful tips:
<ul>
<li>
Use <em>Tablet</em> or <em>Maximized</em> for your form factor and
<em>Landscape</em> for your orientation.
</li>
<li>Be sure your app works well for touch and non-touch Chromebooks.</li>
<li>
If you need to check if your app is running on Chrome OS, look for
<em>chromium</em> as the <code>android.os.Build.BRAND</code> and
<code>android.os.Build.MANUFACTURER</code>.
</li>
<li>Getting logs:</li>
<ul>
<li>
On a PC, you can get logs from your app by running
<code>plugin.shell('adbd')</code> in the JavaScript console
(chrome://inspect/#apps) and then running either <code>adb logcat</code>
or <code>adb pull /data/data/package_name/path/to/your/log.txt</code> from
the Android SDK tools.
</li>
<li>
On a Chromebook, where adb isn't available right now, run either
<code>plugin.shell('logcat')</code> or <code>plugin.shell('cat
/data/data/package_name/path/to/your/log.txt')</code> directly in the
JavaScript console (chrome://inspect/#apps).
</li>
<li>
If the app crashes and you can't get logs using logcat, try collecting
<a href="/native-client/devguide/devcycle/debugging#debugging-with-printf">
stdout and stderr from Chrome/NaCl</a>. On ChromeOS, you can get these
logs from chrome://system/ and expanding <em>ui_log</em>.
</li>
<li>
Javascript console logs sometimes contain relevant information. There are
two contexts, the background page (chrome://extensions, enable Developer
Mode, select app_main.html for your app), and the app window
(chrome://inspect/#apps).
</li>
</ul>
<li>
To enable Google Play services, <a href="arc_playservices">read more</a>.
</li>
<li>
Since ARC is in Beta, it doesn't support all of Google Play Services yet.
However, here are some available APIs:
</li>
<ul>
<li>
<a href="http://developer.android.com/reference/com/google/android/gms/auth/GoogleAuthUtil.html">
Auth (OAuth2)</a>
</li>
<li>
<a href="https://developer.android.com/google/gcm/index.html">GCM</a>
</li>
<li>
<a href="https://developer.android.com/google/play-services/plus.html">
Google+ sign-in</a>
</li>
<li>
<a href="https://developer.android.com/google/play-services/maps.html">
Maps</a>
</li>
<li>
<a href="https://developer.android.com/google/play-services/location.html">
Location</a>
</li>
<li>
<a href="https://developer.android.com/google/play-services/ads.html">
Ads</a>
</li>
</ul>
<li>
To ensure compatibility with all users, package and test your app on the <a
href="https://support.google.com/chromebook/answer/1086915?hl=en&source=genius-rts">Chromebook
Stable channel</a>.
</li>
</ul>
</p>