In my Android application, if I download some JavaScript from a web URI, can that JavaScript read my native files like shared preferences or other files which I stored in my application’s location?
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.