Here is the full error: 04-12 10:36:04.626: ERROR/UriTexture(18929): Unable to load image from URI content://com.gnugu.secretboxplus.imageprovider/test.jpg 04-12 10:36:04.636: WARN/System.err(18929): java.io.FileNotFoundException 04-12 10:36:04.636: WARN/System.err(18929): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java: 123) 04-12 10:36:04.636: WARN/System.err(18929): at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java: 575) 04-12 10:36:04.636: WARN/System.err(18929): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java: 510) 04-12 10:36:04.636: WARN/System.err(18929): at android.content.ContentResolver.openInputStream(ContentResolver.java: 345) 04-12 10:36:04.636: WARN/System.err(18929): at com.cooliris.media.UriTexture.createFromUri(UriTexture.java:106) 04-12 10:36:04.646: WARN/System.err(18929): at com.cooliris.media.UriTexture.load(UriTexture.java:192) 04-12 10:36:04.646: WARN/System.err(18929): at com.cooliris.media.RenderView.loadTextureAsync(RenderView.java:213) 04-12 10:36:04.646: WARN/System.err(18929): at com.cooliris.media.RenderView.access$600(RenderView.java:31) 04-12 10:36:04.646: WARN/System.err(18929): at com.cooliris.media.RenderView$TextureLoadThread.load(RenderView.java: 1002) 04-12 10:36:04.646: WARN/System.err(18929): at com.cooliris.media.RenderView$TextureLoadThread.run(RenderView.java: 986)
On Apr 12, 9:39 am, gnugu <rho...@gmail.com> wrote: > Hi, > I have a ContentProvider that serves an image to default built in > image viewer. > Ever since Android 2.1 the built in image viewer throws FileNotFound > into the log. > I also find this in the log: > 04-12 09:28:54.066: ERROR/UriTexture(11541): Unable to load image from > URI content://com.gnugu.secretboxplus.imageprovider/test.jpg > > The file indeed does exist, I write it on sdcard. > > Here is a piece of code in openFile() method: > > File FILE_NAME = new File(DataAdapter.DATABASE_FILE_PATH, "test.jpg"); > FILE_NAME.createNewFile(); > FileOutputStream fileStream = new FileOutputStream(FILE_NAME); > fileStream.write(pictureData); > fileStream.flush(); > fileStream.close(); > > // now open the file descriptor > ParcelFileDescriptor result = > ParcelFileDescriptor.open(ctx.getFileStreamPath(FILE_NAME.toString()), > ParcelFileDescriptor.MODE_WORLD_READABLE); > > return result; > > This used to work just fine before 2.1 upgrade. This also works fine > in the emulator. > > What am I doing wrong? > > Thank you! -- 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 android-developers+unsubscr...@googlegroups.com 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.