gnugu wrote:
> It fails in DatabaseUtils method:
> 
> public static void readExceptionWithFileNotFoundExceptionFromParcel(
>         Parcel reply) throws FileNotFoundException {
>     int code = reply.readInt();
>     if (code == 0) return;
>     String msg = reply.readString();
>     if (code == 1) {
> *** this is where the exception is thrown *****
>         throw new FileNotFoundException(msg);
>     } else {
>         DatabaseUtils.readExceptionFromParcel(reply, msg, code);
>     }
> }
> 
> Does anybody know what    int code = reply.readInt(); is for? Why is
> it returning 1?

That code is meaningless to you. It would appear that you are having an
exception inside your ContentProvider, probably a FileNotFoundException.
Add yourself an exception handler in the ContentProvider to catch the
exception there, then work to fix it.

>>> ParcelFileDescriptor result =
>>> ParcelFileDescriptor.open(ctx.getFileStreamPath(FILE_NAME.toString()),
>>>         ParcelFileDescriptor.MODE_WORLD_READABLE);

Your use of getFileStreamPath() would appear to be invalid.
getFileStreamPath() "returns the absolute path on the filesystem where a
file created with openFileOutput(String, int) is stored". You are not
using openFileOutput(), and FILE_NAME is probably not valid for use with
getFileStreamPath().

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

Android Development Wiki: http://wiki.andmob.org

-- 
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to