How do I access a file which is not belong to my app?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How do I access a file which is not belong to my app?

Postby android.wizard » Thu May 14, 2009 5:30 am

Context.openFileInput() and Context.openFileOutput() can only access a private file which belong to its app, correct?
If I want to access a file which is not belong to my app, how could I do?
Any examples?
android.wizard
Freshman
Freshman
 
Posts: 7
Joined: Wed May 13, 2009 2:31 pm

Top

Postby padde » Thu May 14, 2009 12:27 pm

You simply cant.. except the file is global read/write if not
there is maybe a content provider for it.. if this is not the case
you cant do anything.. well ok.. hack it but .. thats a bit rude ;)
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby android.wizard » Mon Jun 01, 2009 2:28 pm

padde wrote:You simply cant.. except the file is global read/write if not
there is maybe a content provider for it.. if this is not the case
you cant do anything.. well ok.. hack it but .. thats a bit rude ;)

I recently found a tutorial by plusminus: http://www.anddev.org/building_an_android_filebrowser_list-based_-t67.html.
He use the File object to get the file list of a specified folder.
I wonder when shall we use the API from java.io, and when shall we use the API from android platform. And what's the difference?
android.wizard
Freshman
Freshman
 
Posts: 7
Joined: Wed May 13, 2009 2:31 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests