I noticed the title of your post mentioned res\drawable. If you simply
wanted to load a file from there, you could do this:
getResources().getDrawable(R.drawable.filename);
If you wanted some other kinds of files. You could put them in res\raw
and use this to get an InputStream:
getResources().openRawResource(R.raw.filename);
By putting the files in res\raw or res\drawable, you wouldn't need to
push files to the emulator. They would be part of the apk.
On Apr 7, 2:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hello,
> My application needs to read some data from a file, every time it runs
> on android. I really don't know how to "see" the file from my sources,
> i mean new FileReader("... what ...").
> I actually did manage to solve the problem by copying the file with ./
> adb push, into /data/misc.
> At this moment FileReader("/data/misc/<file>"); works. But i really
> don't know how to submit my app, how will they run my app without
> pushing that file into /data/misc.
>
> Can you help me, please?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---