Home | History | Annotate | Download | only in webapps

Lines Matching full:your

8   <li>Use {@link android.webkit.WebView} to display web pages in your Android application
10 <li>You can create interfaces from your JavaScript to your client-side Android code</li>
15 <li><a href="#AddingWebView">Adding a WebView to Your Application</a></li>
42 part of your activity layout. It does <em>not</em> include any features of a fully developed web
47 provide information in your application that you might need to update, such as an end-user agreement
48 or a user guide. Within your Android application, you can create an {@link android.app.Activity}
49 that contains a {@link android.webkit.WebView}, then use that to display your document that's
52 <p>Another scenario in which {@link android.webkit.WebView} can help is if your application provides
55 find that it's easier to build a {@link android.webkit.WebView} in your Android application that
59 and then implement a {@link android.webkit.WebView} in your Android application that loads the web
63 additional things, such as handle page navigation and bind JavaScript from your web page to
64 client-side code in your Android application.</p>
68 <h2 id="AddingWebView">Adding a WebView to Your Application</h2>
70 <p>To add a {@link android.webkit.WebView} to your Application, simply include the {@code
71 <WebView>} element in your activity layout. For example, here's a layout file in which the
91 <p>Before this will work, however, your application must have access to the Internet. To get
92 Internet access, request the {@link android.Manifest.permission#INTERNET} permission in your
109 <p>If the web page you plan to load in your {@link android.webkit.WebView} use JavaScript, you
110 must enable JavaScript for your {@link android.webkit.WebView}. Once JavaScript is enabled, you can
111 also create interfaces between your application code and your JavaScript code.</p>
118 android.webkit.WebSettings} attached to your {@link android.webkit.WebView}. You can retrieve {@link
133 that's designed specifically for the {@link android.webkit.WebView} in your Android application,
136 setUserAgentString()}, then query the custom user agent in your web page to verify that the
137 client requesting your web page is actually your Android application.</p>
142 android.webkit.WebView} in your Android
143 application, you can create interfaces between your JavaScript code and client-side Android code.
144 For example, your JavaScript code can call a method in your Android code to display a {@link
147 <p>To bind a new interface between your JavaScript and Android code, call {@link
149 a class instance to bind to your JavaScript and an interface name that your JavaScript can call to
152 <p>For example, you can include the following class in your Android application:</p>
171 <p class="caution"><strong>Caution:</strong> If you've set your <a
175 available to your JavaScript (the method must also be public). If you do not provide the
176 annotation, the method is not accessible by your web page when running on Android 4.2 or
182 <p>You can bind this class to the JavaScript that runs in your {@link android.webkit.WebView} with
192 android.webkit.WebView}. At this point, your web application has access to the {@code
208 available to your web page. So, at the click of the button, the {@code showAndroidToast()}
212 <p class="note"><strong>Note:</strong> The object that is bound to your JavaScript runs in
217 JavaScript to control your Android application. This can be a very useful feature or a dangerous
221 your client-side code and possibly any code of the attacker's choosing. As such, you should not use
223 you wrote all of the HTML and JavaScript that appears in your {@link android.webkit.WebView}. You
225 navigate to other web pages that are not your own, within your {@link android.webkit.WebView}
236 <p>When the user clicks a link from a web page in your {@link android.webkit.WebView}, the default
239 loads the destination URL. However, you can override this behavior for your {@link
241 so links open within your {@link android.webkit.WebView}. You can then allow the user to navigate
242 backward and forward through their web page history that's maintained by your {@link
246 android.webkit.WebViewClient} for your {@link android.webkit.WebView}, using {@link
254 <p>That's it. Now all links the user clicks load in your {@link android.webkit.WebView}.</p>
256 <p>If you want more control over where a clicked link load, create your own {@link
299 <p>When your {@link android.webkit.WebView} overrides URL loading, it automatically accumulates a
304 <p>For example, here's how your {@link android.app.Activity} can use the device <em>Back</em> button