Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Android
Android file path from assests
Gabriela Radu
Greenhorn
Posts: 5
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
Do you know why it does not recognize my path?
Uri path = Uri.fromFile(new File("assets/test.xml")); // tried with "file:///android_asset/test.xml" String fileIn = path.getPath(); FileInputStream fis = new FileInputStream(fileIn);
I get a FileNotFound error at the end, the fis variable.
Thank you very much.
Swastik Dey
Bartender
Posts: 2270
20
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
try this
InputStream is=getAssets().open("test.xml");
Swastik
Monu Tripathi
Rancher
Posts: 1369
1
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Gabriela Radu : Understand the reason why your approach did not work?
The "asset" folder is not part of Android file system but your app.
[
List of FAQs
] | [
Android FAQ
] | [
Samuh Varta
]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to copy a file from one folder to another folder?
print korean charater file using java
How to make it relative path?
please help...
EXTRACTING DATA FROM CSV OR FIXED LENGTH FILE
More...