简体   繁体   English

如何从另一个Android应用程序资产文件读取html文件?

[英]How to read a html file from another android app assets file?

I need to load html file in a webview component from another app assets files that contain a web site. 我需要从另一个包含网站的应用程序资产文件中将HTML文件加载到webview组件中。 This is a call for my local folder, but I need to call from another app. 这是对我的本地文件夹的呼叫,但是我需要从另一个应用程序呼叫。 mWebView.loadUrl("file:///android_asset/www/player/player.htm"); mWebView.loadUrl(“ file:///android_asset/www/player/player.htm”);

For that probably you need to implement a content provider in the other app and thru that you could access the file. 为此,您可能需要在另一个应用程序中实现一个内容提供程序,然后才能访问该文件。 I don't see how you could access an other app's assets folder without any consent from the other app. 未经其他应用程序的任何同意,我看不到如何访问其他应用程序的资产文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM