Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-04-03 Thread Michael Lamers
Hi, I have the same problem using setImageURI. The problem seems to be worse than just a scaling issue. It seems that some vendors have fixed this bug for some of their devices. I have a HTC Sensation that doesn't scale the image set through setImageURI. All other devices I know do. For me

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-23 Thread YuviDroid
I think I found the problem...and it looks like it's an Android bug. Drawable.createFromStream() doesn't take as parameter a Resources object, and later it calls Drawable.createFromResourceStream() passing 'null' as the Resources parameter. From my understanding the resources are then used to

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-19 Thread YuviDroid
I tried also to set the bitmap density before saving it to disk...just in case it made any difference...but it doesn't. No one has a solution to this issue? Thanks, Yuvi On Sat, Feb 18, 2012 at 3:07 PM, YuviDroid yuvidr...@gmail.com wrote: Hi Mark, I actually switched from

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-18 Thread YuviDroid
Hi Dianne, thanks for your reply. The problem is that I'm using RemoteViews.setImageViewUri(), so I don't have a bitmap object to set the density. The Uri I'm using is content://... which reaches my ContentProvider at the method openFile(Uri,String). I looked at the Android source code and I see

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-18 Thread Mark Murphy
On Sat, Feb 18, 2012 at 8:40 AM, YuviDroid yuvidr...@gmail.com wrote: thanks for your reply. The problem is that I'm using RemoteViews.setImageViewUri(), so I don't have a bitmap object to set the density. Then switch to setBitmap() or setImageViewBitmap(). -- Mark Murphy (a Commons Guy)

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-18 Thread YuviDroid
Hi Mark, I actually switched from setImageViewBitmap() to setImageViewUri() because sometimes I need to display large bitmaps which do not work if I use setImageViewBitmap(). Yuvi On Sat, Feb 18, 2012 at 2:57 PM, Mark Murphy mmur...@commonsware.comwrote: On Sat, Feb 18, 2012 at 8:40 AM,

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-17 Thread YuviDroid
Hi, sorry to resurrect this post...but I got into a similar problem. And as the OP did, I'm using RemoteViews.setImageViewUri() to set my image on the appwidget. However I noticed that my image is being scaled according to the screen density. So, for example, on an XHDPI screen, if I have a

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-17 Thread Dianne Hackborn
Set the desired density of your bitmap: http://developer.android.com/reference/android/graphics/Bitmap.html#setDensity(int) On Fri, Feb 17, 2012 at 12:56 PM, YuviDroid yuvidr...@gmail.com wrote: Hi, sorry to resurrect this post...but I got into a similar problem. And as the OP did, I'm using

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-09-19 Thread Efi Merdler-Kravitz
Hi, I'm encountering exactly the same problem,however I'm not getting my failed bind transaction immediately, it looks like it happens after a certain amount of widget updates. The initial size is small enough to succeed and the image size is small ( I'm always updating a small single image ~

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-02 Thread Ash McConnell
Odd that File.setReadable doesn't seem to be available on my JDK installation (the latest version of 1.6) -- 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

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-02 Thread Ash McConnell
It's because Android implemented Java.io.File and didn't include File.setReadable until API 9 (I am using API 8) -- 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

[android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Ash McConnell
Hi Folks, I am coming across an error when I am updating my RemoteViews in my AppWidget. !!! FAILED BINDER TRANSACTION !!! This is caused because all the changes to the RemoteViews are serialised (e.g. setInt and setImageViewBitmap ). The bitmaps are also serialised into an internal bundle.

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Kostya Vasilyev
If you are overflowing the binder RPC mechanism, maybe your bitmap really is too large, and would cause performance problems even if it went through. There are other ways to push a dynamically generated bitmap into a widget, perhaps you should consider those. -- Kostya 01.08.2011 18:45,

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Ash McConnell
Hi Kostya, It's not that the single bitmap is too large, it's that I'm updating quite a few bitmaps. The biggest bitmap in PNG form (a lot smaller I know) is only 4KB. I am updating 14 ImageViews in each update. Is there any way to split the update for each widget instance somehow? What are

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Kostya Vasilyev
01.08.2011 19:02, Ash McConnell пишет: Hi Kostya, It's not that the single bitmap is too large, it's that I'm updating quite a few bitmaps. The biggest bitmap in PNG form (a lot smaller I know) is only 4KB. I am updating 14 ImageViews in each update. Is there any way to split the update for

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Dianne Hackborn
It is actually 1MB. The most common reason for this error is a too large IPC. As a quick test, you could try removing half the bitmaps or so and see if it works. If so, the issue is almost certainly an IPC that is too large. If that is the case, you just need to reduce the amount of data being

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Ash McConnell
Hi Kostya / Dianne, Thanks for the replies. As Dianne suggested, removing half the bitmaps does indeed make it work. I can't really reduce the amount of bitmaps, so I am trying to use the setImageURI on ImageView. Unfortunately I am getting permission denied errors. Here is the test code I

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Dianne Hackborn
Those files aren't be accessed by you, they are being opened by another app (the launcher) when it applies your RemoteViews to the widget it is displaying. On Mon, Aug 1, 2011 at 9:23 AM, Ash McConnell ash.mcconn...@gmail.comwrote: Hi Kostya / Dianne, Thanks for the replies. As Dianne

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Ash McConnell
Ah ok, I copy the files over into the skins directory in my configuration activity. I currently use normal java.io.FileOutputStream objects, should I be using context.openFileOutput with MODE_WORLD_READABLEhttp://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Kostya Vasilyev
That should work. 01.08.2011 20:40, Ash McConnell ?: Ah ok, I copy the files over into the skins directory in my configuration activity. I currently use normal java.io.FileOutputStream objects, should I be using context.openFileOutput with MODE_WORLD_READABLE

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Ash McConnell
Thanks Kostya and Dianne, setUri works as expected. I had to create the files using context.openFileOutput. Unfortunately that means I loose the ability to use directories. I can't see a Java way to set permission on files, it can be done with native methods, but that seems like overkill.

Re: [android-developers] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2011-08-01 Thread Kostya Vasilyev
Well, there is File.setReadable, which is supposed to be able to change the permissions, but I've never tried it myself 01.08.2011 22:05, Ash McConnell пишет: Thanks Kostya and Dianne, setUri works as expected. I had to create the files using context.openFileOutput. Unfortunately that