diff options
Diffstat (limited to 'docs/html/guide/webapps')
-rw-r--r-- | docs/html/guide/webapps/debugging.jd | 6 | ||||
-rw-r--r-- | docs/html/guide/webapps/index.jd | 77 | ||||
-rw-r--r-- | docs/html/guide/webapps/overview.jd | 71 |
3 files changed, 85 insertions, 69 deletions
diff --git a/docs/html/guide/webapps/debugging.jd b/docs/html/guide/webapps/debugging.jd index c0dce48..1eef1ae 100644 --- a/docs/html/guide/webapps/debugging.jd +++ b/docs/html/guide/webapps/debugging.jd @@ -18,7 +18,7 @@ messages</li> <h2>See also</h2> <ol> - <li><a href="{@docRoot}guide/developing/debugging/index.html">Debugging</a></li> + <li><a href="{@docRoot}tools/debugging/index.html">Debugging</a></li> </ol> </div> @@ -43,10 +43,10 @@ the device throws an error, as well as log messages written from your applicatio those written using JavaScript {@code console} APIs.</p> <p>To run logcat and view messages, execute {@code adb logcat} from your Android SDK {@code tools/} directory, or, from DDMS, select -<strong>Device > Run logcat</strong>. When using the <a href="{@docRoot}sdk/eclipse-adt.html">ADT +<strong>Device > Run logcat</strong>. When using the <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT plugin for Eclipse</a>, you can also view logcat messages by opening the Logcat view, available from <strong>Window > Show View > Other > Android > Logcat</strong>.</p> - <p>See <a href="{@docRoot}guide/developing/debugging/debugging-log.html">Debugging</a> + <p>See <a href="{@docRoot}tools/debugging/debugging-log.html">Debugging</a> for more information about <codelogcat</code>.</p> </div> </div> diff --git a/docs/html/guide/webapps/index.jd b/docs/html/guide/webapps/index.jd index 069290a..df7ddbe 100644 --- a/docs/html/guide/webapps/index.jd +++ b/docs/html/guide/webapps/index.jd @@ -1,71 +1,16 @@ -page.title=Web Apps Overview -@jd:body - -<div class="figure" style="width:327px"> - <img src="{@docRoot}images/webapps/webapps.png" alt="" /> - <p class="img-caption"><strong>Figure 1.</strong> You can make your web content available to -users in two ways: in a traditional web browser and in an Android application, by -including a WebView in the layout.</p> -</div> - -<p>There are essentially two ways to deliver an application on Android: as a -client-side application (developed using the Android SDK and installed on user devices as an {@code -.apk}) or as a web application (developed using web standards and accessed through a web -browser—there's nothing to install on user devices).</p> +page.title=Web Apps +page.landing=true +page.landing.intro=Android has always been about connectivity and providing a great web browsing experience, so building your app with web technologies can be a great opportunity. Not only can you build an app on the web and still optimize your designs for Android's various screen sizes and densities, but you can also embed web-based content into your Android app using WebView. +page.landing.image= -<p>The approach you choose for your application could depend on several factors, but Android makes -the decision to develop a web application easier by providing:</p> -<ul> - <li>Support for viewport properties that allow you to properly size your web application -based on the screen size</li> - <li>CSS and JavaScript features that allow you to provide different styles and images -based on the screen's pixel density (screen resolution)</li> -</ul> - -<p>Thus, your decision to develop a web application for Android can exclude consideration for -screen support, because it's already easy to make your web pages look good on all types of screens -powered by Android.</p> - -<p>Another great feature of Android is that you don't have to build your application purely on -the client or purely on the web. You can mix the two together by developing a client-side Android -application that embeds some web pages (using a {@link android.webkit.WebView} in your Android -application layout). Figure 1 visualizes how you can provide access to your web pages from either -a web browser or your Android application. However, you shouldn't develop an Android -application simply as a means to launch your web site. Rather, the web pages you embed in your -Android application should be designed especially for that environment. You can even define an -interface between your Android application and your web pages that allows JavaScript in the web -pages to call upon APIs in your Android application—providing Android APIs to your web-based -application.</p> +@jd:body -<p>Since Android 1.0, {@link android.webkit.WebView} has been available for Android -applications to embed web content in their layout and bind JavaScript to Android APIs. After -Android added support for more screen densities (adding support for high and low-density -screens), Android 2.0 added features to the WebKit framework to allow web pages to specify -viewport properties and query the screen density in order to modify styles -and image assets, as mentioned above. Because these features are a part of Android's WebKit -framework, both the Android Browser (the default web browser provided with the platform) and -{@link android.webkit.WebView} support the same viewport and screen density features.</p> +<div class="landing-docs"> -<p>To develop a web application for Android-powered devices, you should read the -following documents:</p> + <div class="col-6"> + </div> -<dl> - <dt><a href="{@docRoot}guide/webapps/targeting.html"><strong>Targeting Screens from Web -Apps</strong></a></dt> - <dd>How to properly size your web app on Android-powered devices and support -multiple screen densities. The information in this document is important if you're building a web -application that you at least expect to be available on Android-powered devices (which you should -assume for anything you publish on the web), but especially if you're targeting mobile devices -or using {@link android.webkit.WebView}.</dd> - <dt><a href="{@docRoot}guide/webapps/webview.html"><strong>Building Web Apps in -WebView</strong></a></dt> - <dd>How to embed web pages into your Android application using {@link android.webkit.WebView} and -bind JavaScript to Android APIs.</dd> - <dt><a href="{@docRoot}guide/webapps/debugging.html"><strong>Debugging Web Apps</strong></a></dt> - <dd>How to debug web apps using JavaScript Console APIs.</dd> - <dt><a href="{@docRoot}guide/webapps/best-practices.html"><strong>Best Practices for Web -Apps</strong></a></dt> - <dd>A list of practices you should follow, in order to provide an effective web application on -Android-powered devices.</dd> -</dl> + <div class="col-6"> + </div> +</div>
\ No newline at end of file diff --git a/docs/html/guide/webapps/overview.jd b/docs/html/guide/webapps/overview.jd new file mode 100644 index 0000000..069290a --- /dev/null +++ b/docs/html/guide/webapps/overview.jd @@ -0,0 +1,71 @@ +page.title=Web Apps Overview +@jd:body + +<div class="figure" style="width:327px"> + <img src="{@docRoot}images/webapps/webapps.png" alt="" /> + <p class="img-caption"><strong>Figure 1.</strong> You can make your web content available to +users in two ways: in a traditional web browser and in an Android application, by +including a WebView in the layout.</p> +</div> + +<p>There are essentially two ways to deliver an application on Android: as a +client-side application (developed using the Android SDK and installed on user devices as an {@code +.apk}) or as a web application (developed using web standards and accessed through a web +browser—there's nothing to install on user devices).</p> + +<p>The approach you choose for your application could depend on several factors, but Android makes +the decision to develop a web application easier by providing:</p> +<ul> + <li>Support for viewport properties that allow you to properly size your web application +based on the screen size</li> + <li>CSS and JavaScript features that allow you to provide different styles and images +based on the screen's pixel density (screen resolution)</li> +</ul> + +<p>Thus, your decision to develop a web application for Android can exclude consideration for +screen support, because it's already easy to make your web pages look good on all types of screens +powered by Android.</p> + +<p>Another great feature of Android is that you don't have to build your application purely on +the client or purely on the web. You can mix the two together by developing a client-side Android +application that embeds some web pages (using a {@link android.webkit.WebView} in your Android +application layout). Figure 1 visualizes how you can provide access to your web pages from either +a web browser or your Android application. However, you shouldn't develop an Android +application simply as a means to launch your web site. Rather, the web pages you embed in your +Android application should be designed especially for that environment. You can even define an +interface between your Android application and your web pages that allows JavaScript in the web +pages to call upon APIs in your Android application—providing Android APIs to your web-based +application.</p> + +<p>Since Android 1.0, {@link android.webkit.WebView} has been available for Android +applications to embed web content in their layout and bind JavaScript to Android APIs. After +Android added support for more screen densities (adding support for high and low-density +screens), Android 2.0 added features to the WebKit framework to allow web pages to specify +viewport properties and query the screen density in order to modify styles +and image assets, as mentioned above. Because these features are a part of Android's WebKit +framework, both the Android Browser (the default web browser provided with the platform) and +{@link android.webkit.WebView} support the same viewport and screen density features.</p> + +<p>To develop a web application for Android-powered devices, you should read the +following documents:</p> + +<dl> + <dt><a href="{@docRoot}guide/webapps/targeting.html"><strong>Targeting Screens from Web +Apps</strong></a></dt> + <dd>How to properly size your web app on Android-powered devices and support +multiple screen densities. The information in this document is important if you're building a web +application that you at least expect to be available on Android-powered devices (which you should +assume for anything you publish on the web), but especially if you're targeting mobile devices +or using {@link android.webkit.WebView}.</dd> + <dt><a href="{@docRoot}guide/webapps/webview.html"><strong>Building Web Apps in +WebView</strong></a></dt> + <dd>How to embed web pages into your Android application using {@link android.webkit.WebView} and +bind JavaScript to Android APIs.</dd> + <dt><a href="{@docRoot}guide/webapps/debugging.html"><strong>Debugging Web Apps</strong></a></dt> + <dd>How to debug web apps using JavaScript Console APIs.</dd> + <dt><a href="{@docRoot}guide/webapps/best-practices.html"><strong>Best Practices for Web +Apps</strong></a></dt> + <dd>A list of practices you should follow, in order to provide an effective web application on +Android-powered devices.</dd> +</dl> + |