Matt,

I'm assuming your widget is running inside the home screen application (Launcher2 by default).

The launcher is a separate application from your own, and therefore cannot access files stored in your application's private data storage directory.

Create these image files someplace where other applications (including the launcher) can read them.

-- Kostya

12.03.2011 21:44, Matt M пишет:
Hello,

This is really baffling. In an AppWidgetProvider I am trying to
setImageViewUri using this Uri: Uri.fromFile(getFileStreamPath(name))

I know the file exists in internal storage because I've tried
File.exists(), and I also successfully tried:

Bitmap b =
BitmapFactory.decodeFile(getFileStreamPath(path).getAbsolutePath());
views.setImageViewBitmap(id, b);

I need to do this with 3 images of varying size so converting to a
Bitmap is out of the question (I get a Failed Binder Transaction
regularly).

Why is it that I can use the same getFileStreamPath to create a bitmap
but cannot create the Uri to use in setImageViewUri? (this is all in
an AppWidgetProvider)

Any help would be greatly appreciated!

Matt.



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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