I have an xml-file that contains data that I want to read. The code works in a desktop environment but I can’t figure out how to store and read the file from an android device. Ideas?
Share
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.
Put the xml file in the assets folder and fetch it using the AssetManager:
http://developer.android.com/reference/android/content/res/AssetManager.html
To read the file use the same java code that works for you on J2SE.