Updated docs for next

This commit is contained in:
Website Deployment Script
2016-11-11 20:41:24 +00:00
parent 680f739df4
commit 9b7ca82c08
@@ -360,7 +360,7 @@ public boolean <span class="token function">onKeyUp<span class="token punctuatio
<span class="token keyword">return</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">return</span> super<span class="token punctuation">.</span><span class="token function">onKeyUp<span class="token punctuation">(</span></span>keyCode<span class="token punctuation">,</span> event<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></div><p>That&#x27;s it, your activity is ready to run some JavaScript code.</p><h2><a class="anchor" name="run-your-app"></a>Run your app <a class="hash-link" href="docs/integration-with-existing-apps.html#run-your-app">#</a></h2><p>To run your app, you need to first start the development server. To do this, simply run the following command in your root folder:</p><div class="prism language-javascript">$ npm start</div><p>Now build and run your Android app as normal (<code>./gradlew installDebug</code> from command-line; in Android Studio just create debug build as usual).</p><blockquote><p>If you are using Android Studio for your builds and not the Gradle Wrapper directly, make sure you install <a href="https://facebook.github.io/watchman/" target="_blank">watchman</a> before running <code>npm start</code>. It will prevent the packager from crashing due to conflicts between Android Studio and the React Native packager.</p></blockquote><p>Once you reach your React-powered activity inside the app, it should load the JavaScript code from the development server and display:</p><p><img src="img/EmbeddedAppAndroid.png" alt="Screenshot"></p><span><script>
<span class="token punctuation">}</span></div><p>That&#x27;s it, your activity is ready to run some JavaScript code.</p><blockquote><p>If your app is targeting the Android <code>api level 23</code> or greater, make sure you have, for the development build, the <code>overlay permission</code> enabled. You can check it with <code>Settings.canDrawOverlays(this);</code>. This is required because, if your app produces an error in the react native component, the error view is displayed above all the other windows. Due to the new permissions system, introduced in the api level 23, the user needs to approve it.</p></blockquote><h2><a class="anchor" name="run-your-app"></a>Run your app <a class="hash-link" href="docs/integration-with-existing-apps.html#run-your-app">#</a></h2><p>To run your app, you need to first start the development server. To do this, simply run the following command in your root folder:</p><div class="prism language-javascript">$ npm start</div><p>Now build and run your Android app as normal (<code>./gradlew installDebug</code> from command-line; in Android Studio just create debug build as usual).</p><blockquote><p>If you are using Android Studio for your builds and not the Gradle Wrapper directly, make sure you install <a href="https://facebook.github.io/watchman/" target="_blank">watchman</a> before running <code>npm start</code>. It will prevent the packager from crashing due to conflicts between Android Studio and the React Native packager.</p></blockquote><p>Once you reach your React-powered activity inside the app, it should load the JavaScript code from the development server and display:</p><p><img src="img/EmbeddedAppAndroid.png" alt="Screenshot"></p><span><script>
// Convert <div>...<span><block /></span>...</div>
// Into <div>...<block />...</div>
var blocks = document.getElementsByTagName('block');