Have a look at the API demo for loading assets:

http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/content/ReadAsset.html

Note that the asset manager (and all file related stuff in android) is case
sensitive.  It looks like you are trying to load Ship.Obj, but the file is
Ship.obj.

On Sun, Nov 30, 2008 at 8:51 PM, Casey Borders <[EMAIL PROTECTED]>wrote:

> I am using this code to try to access my assets:
> try
> {
> Resources res = context.getResources();
> AssetManager assMan = res.getAssets();
>  String assets[] = assMan.list("Models");
> InputStream is = assMan.open("Models/Ship.Obj");
>  ObjLoader loader = new ObjLoader(is);
> mVertexBuffer = loader.getVerts();
>  mIndexBuffer = loader.getIndex();
> }
> catch(IOException e)
> {
> // TODO Auto-generated catch block
>  e.printStackTrace();
> }
>
> When I look at the value of assets it contains "Ship.obj" (see attached
> image) but when I try to open the file it throws the exception.  Does anyone
> have any experience with this?
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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