corwin42 Expert Licensed User Longtime User Jun 28, 2012 #1 [Solved] Setting images for widget with many imageviews I have a homescreen widget with some imageviews. Updating the images does not work reliably. This took me some time to find out what's the problem so I could create a test project. If you run the test project (at least on my device) the images are not displayed in the widget. In the unfiltered log I can see the message "!!! FAILED BINDER TRANSACTION !!!" If I update just one image it works. If I call rv.UpdateWidget after setting the image it works better but still some images won't display. When the problem occurs even the Panel1_Click event does not fire anymore. Any ideas? Attachments WidgetBug.zip WidgetBug.zip 56.8 KB · Views: 491 Last edited: Jun 28, 2012
[Solved] Setting images for widget with many imageviews I have a homescreen widget with some imageviews. Updating the images does not work reliably. This took me some time to find out what's the problem so I could create a test project. If you run the test project (at least on my device) the images are not displayed in the widget. In the unfiltered log I can see the message "!!! FAILED BINDER TRANSACTION !!!" If I update just one image it works. If I call rv.UpdateWidget after setting the image it works better but still some images won't display. When the problem occurs even the Panel1_Click event does not fire anymore. Any ideas?
Erel B4X founder Staff member Licensed User Longtime User Jun 28, 2012 #2 This is a limitation of Android widget system. The images are serialized and sent to the home screen process. Sending too many images or too large images will fail.
This is a limitation of Android widget system. The images are serialized and sent to the home screen process. Sending too many images or too large images will fail.
corwin42 Expert Licensed User Longtime User Jun 28, 2012 #3 The strange thing is that it worked some time ago. I have reworked my weather app completely and now I wanted to reactivate the widget and got the problem. I used the old layout file and the old code. The only thing I changed was the data structure with the weather data and that I now use caching for the images so that not every bitmap is loaded again for each image. ... Ah, and I changed the image files. They now are 256x256 pixel in size instead of 128x128. I will try to use LoadBitmapSample instead with the size I need. Thanks for the info. With this I can hopefully fix the issue in my app.
The strange thing is that it worked some time ago. I have reworked my weather app completely and now I wanted to reactivate the widget and got the problem. I used the old layout file and the old code. The only thing I changed was the data structure with the weather data and that I now use caching for the images so that not every bitmap is loaded again for each image. ... Ah, and I changed the image files. They now are 256x256 pixel in size instead of 128x128. I will try to use LoadBitmapSample instead with the size I need. Thanks for the info. With this I can hopefully fix the issue in my app.
corwin42 Expert Licensed User Longtime User Jun 28, 2012 #4 Ok, LoadBitmapSample fixed the problem completely. I thought dealing with small icon like files wouldn't be a problem in my app. I was wrong.
Ok, LoadBitmapSample fixed the problem completely. I thought dealing with small icon like files wouldn't be a problem in my app. I was wrong.