What you want is not possible. You will need to modify the code you
are porting to have a method that takes an InputStream.

On Wed, Dec 15, 2010 at 4:34 PM, btschumy <[email protected]> wrote:
> I am porting some existing code to android.  I have some data files
> that I need to put in the assets directory (or some comparable place
> in the package).  The code I'm porting wants a path to the directory
> containing the data files, in this case "assets".  However, it seems
> like android won't let you access the assets directory directly
> without AssetManager.  I assume this has to do with localization
> issues.
>
> So if I know I placed a resource "Data.dat" in assets, is there any
> way to get a path to it so I can open it with something like:
>
> FileInputStream in = new FileInputStream(path);
>
> I really need a path to the resource.  I can't use
>
> AssetManager assetMgr = this.getAssets();
> InputStream in = assetMgt.open(filename);
>
> Is this possible?
>
> Thanks.
>
> --
> 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]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to