Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe using a cache is the best way... for that you should check <a href="http://developer.android.com/reference/android/webkit/WebSettings.html" rel="nofollow">http://developer.android.com/reference/android/webkit/WebSettings.html</a></p> <blockquote> <p>"Manages settings state for a WebView. When a WebView is first created, it obtains a set of default settings. These default settings will be returned from any getter call. A WebSettings object obtained from WebView.getSettings() is tied to the life of the WebView. If a WebView has been destroyed, any method call on WebSettings will throw an IllegalStateException."</p> </blockquote> <p>Especifically:</p> <pre><code>public static final int **LOAD_CACHE_ONLY** </code></pre> <p>Since: API Level 1 Don't use the network, load from cache only. Use with setCacheMode(int). Constant Value: 3 (0x00000003)</p> <p>Or</p> <pre><code>public static final int **LOAD_CACHE_ELSE_NETWORK** </code></pre> <p>Since: API Level 1 Use cache if content is there, even if expired (eg, history nav) If it is not in the cache, load from network. Use with setCacheMode(int). Constant Value: 1 (0x00000001)</p> <p>Update1:</p> <p>hmm "crappy code of all life" for example:</p> <pre><code>public static InputStream fetch(String url) throws MalformedURLException, IOException { DefaultHttpClient httpClient = new DefaultHttpClient(); HttpGet request = new HttpGet(url); HttpResponse response = httpClient.execute(request); return response.getEntity().getContent(); } private static String convertStreamToString(InputStream is) throws IOException { StringWriter writer = new StringWriter(); IOUtils.copy(is, writer, "UTF-8"); return writer.toString(); } </code></pre> <p>So, you can fetch a url with <strong>InputStream fetch(String url)</strong> an then convert that stream to String with private static String <strong>convertStreamToString(InputStream is)</strong> and save that stream to a file, later you can load that content to a webview..... to read later</p> <p>Update2:</p> <p>Or you can do some Java Serialization stuff... cant remember if this work on android xD</p> <p><a href="http://java.sun.com/developer/technicalArticles/Programming/serialization/" rel="nofollow">Discover the secrets of the Java Serialization API</a> <a href="http://java.sun.com/developer/technicalArticles/Programming/serialization/" rel="nofollow">http://java.sun.com/developer/technicalArticles/Programming/serialization/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload