On Mon, Dec 12, 2011 at 8:16 AM, saex <[email protected]> wrote:
> I need to know the string path to a file on assets folder, because i'm
> using a map api that needs to receive a string path, and my maps must
> be stored on assets folder
What you want is not directly possible. There is no "string path to a
file on assets folder", because there is no "assets folder" except on
your development machine.
> This is the code i'm trying:
>
> MapView mapView = new MapView(this);
> mapView.setClickable(true);
> mapView.setBuiltInZoomControls(true);
> mapView.setMapFile("file:///android_asset/m1.map");
> setContentView(mapView);
I am assuming that this is not a standard MapView, as that does not
have a setMapFile() method.
That being said, in general, if you need a path to an asset (and not a
Uri, as you are trying to use), you will need to copy the file out of
assets to a local file, then use a path to that local file.
--
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 2.2
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