0

在我的 Android 应用程序中,如果我JavaScript从 Web URI 下载一些内容,该 JavaScript 是否可以读取我的本机文件,例如共享首选项或存储在我的应用程序位置的其他文件?

有任何想法吗?

4

1 回答 1

1

Generally, no. If it is running in a WebView and you have hooks to native methods in that (via addJavascriptInterface()), and the JS code you download knows (or guesses) what they are, it might be able to call them. Which could technically result in it reading files.

于 2012-10-17T05:44:10.813 回答