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:
Tim Cooke
Campbell Ritchie
Ron McLeod
Junilu Lacar
Liutauras Vilda
Sheriffs:
Paul Clapham
Jeanne Boyarsky
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Piet Souris
Carey Brown
Bartenders:
Jesse Duncan
Frits Walraven
Mikalai Zaikin
Forum:
Android
Android file path from assests
Gabriela Radu
Greenhorn
Posts: 5
I like...
posted 10 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 10 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 10 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
]
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
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...