How to open a local HTML page in a native browser for Android (not in web browsing)?

I have a FORM html file in the asset folder. I want to open it in a native browser, for example,

String dataUri = "file:///android_asset/testform.html";
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(dataUri));
startActivity(browserIntent);

How to open it in a separate browser window, and not in a web browser. I do not want to display it as a webview application.

I want to open a browser because my URLs return PDF or HTML files. HTML loads in webview correctly, but PDF does not open in webview. Data (HTML or PDF) is dynamic. Therefore, I want to open a browser window so that it can be processed in the native path.

+4
source share

No one has answered this question yet.

Source: https://habr.com/ru/post/1656076/


All Articles