how open local html page in browser

前端 未结 5 1825
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 20:51

I am making an application in which i want to open a local html page in the browser. I am able to open google.com. But when i\'m opening local html file. But i am getting fo

5条回答
  •  有刺的猬
    2020-12-20 21:35

    You need to use the Android Assetmanager to read a file in assets

    AssetManager am = context.getAssets();
    InputStream is = am.open("trialhtml.html");
    

提交回复
热议问题