Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are several problems here.</p> <p>First, there is no <code>/android_asset</code> directory in the root of the device, let alone an <code>iCD_credits_it.html</code> file in it.</p> <p>Second, your <code>setClassName()</code> will cause this code to crash on many devices. <strong>Do not hard-code package and class names</strong>, unless you only plan on running your app on your own device.</p> <p>Third, either the file is "in Resource folder", or it is "in assets folder", or you have two copies of the file. Resources and assets, while similar, are not the same thing.</p> <p>Fourth, you will have great difficulty finding a browser capable of reading files from either resources or assets of your project. Assets is simply impossible; finding a browser that could read HTML out of your raw resources is merely improbable.</p> <p>Either:</p> <ul> <li><p>Use a <code>WebView</code> and display it yourself, or</p></li> <li><p>Write your own <code>ContentProvider</code> to serve your HTML out of <code>assets/</code> of your project, or</p></li> <li><p>Try <a href="https://github.com/commonsguy/cwac-provider" rel="nofollow">my <code>StreamProvider</code></a> for a "canned" <code>ContentProvider</code> that can serve files out of <code>assets/</code> of your project, or</p></li> <li><p>Copy the file to external storage (e.g., <code>getExternalFilesDir()</code>) and try to get a browser to load it from there</p></li> </ul> <p>Only the first one is guaranteed to work. The others will vary based on the capabilities of the browsers at the user's disposal.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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