[android-developers] Re: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
Mark, thanks for suggestion related to content provider. I made some research and content provider is not doable because I can send file reference only. My app is clock so I had to serialize bitmap every minute to SD card and it would be too much resource consuming. I finally ended up with sending smaller bitmaps and scale them up in remote view's layout. Back to original topic of this thread: Shouldn't be approach how to update bitmaps in RemoteViews changed? It is virtually impossible to make clock that is 4x4 icons wide. It would be either battery consuming or bad image quality. I have quite bad feeling from ContentProviders API. It IMHO violates good OOP design principles (why it expects file descriptors instead of streams? Why class ParcelFileDescriptor is tied to Socket, DataGramSocket and FileDescriptor classes? Should not be more generic with specific implementations for every Socket, ... in separate class?) I would love to hear from Google's engineers that they think about improvements of Widget API. Widgets are major advantages of Android (comparing to major competitors iOS and WP7). My 2 cents Tom On Nov 22, 1:50 pm, Mark Murphy mmur...@commonsware.com wrote: OK, so, use a content provider. Admittedly, it'd be nice if there were a way to serve up files from RAM via a content provider -- the only way I know to serve files via openFile() is for them to actually exist as files somewhere, meaning disk I/O for no particularly good reason. On Tue, Nov 22, 2011 at 7:27 AM, Kostya Vasilyev kmans...@gmail.com wrote: Using multiple remote views per update is a sure way to get a messed up widget after a configuration change, and sometimes sooner. 2011/11/22 Mark Murphy mmur...@commonsware.com 2011/11/21 Tomáš Hubálek tom.huba...@gmail.com: BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. Then use multiple RemoteView updates, one per chunk. Or use a ContentProvider. 1) What Google recommends to do? - Use content provider? Most likely. Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? If I had to guess, the failure is in another process, either the OS process or the home screen's process. You will only get exceptions for failures in your own process. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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 -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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
[android-developers] Re: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
I have the same feeling :-( On Nov 22, 1:27 pm, Kostya Vasilyev kmans...@gmail.com wrote: Using multiple remote views per update is a sure way to get a messed up widget after a configuration change, and sometimes sooner. 2011/11/22 Mark Murphy mmur...@commonsware.com 2011/11/21 Tomáš Hubálek tom.huba...@gmail.com: BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. Then use multiple RemoteView updates, one per chunk. Or use a ContentProvider. 1) What Google recommends to do? - Use content provider? Most likely. Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? If I had to guess, the failure is in another process, either the OS process or the home screen's process. You will only get exceptions for failures in your own process. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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 -- 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
[android-developers] Re: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
@BelvCompScs I'm sorry but I don't understand your reply. What did you want to say? Is it related to my question? How do you think I have to implement it? On Nov 22, 5:53 am, BelvCompSvs fa829...@gmail.com wrote: if you really want to have some fun go listen to Brad Fitzpatrick at the video tab of developer.android ~ then if you agree in principle with general concept of where he tries to go with the discussion consider writing correct code for your apps and do not engage lookbacks . I am not going against what you say On Nov 21, 4:54 am, Tomá¹ Hubálek tom.huba...@gmail.com wrote: Hello, my app Make Your Clock Widget (https://market.android.com/details? id=net.hubalek.android.makeyourclock.pro) is generating widget content as custom drawn bitmap. As you probably know there is (not specified in documentation but existing) limit on size of bitmap sent via RemoteViews. It was possible to live with it (I just didn't allow bigger widgets) but with HD displays this stops working as even 4x2 widget contains too big bitmap as 294 wide * 146 high * 1.6^2 (density of SGS display) was bellow limit but 294 * 146 * 1.97^2 (density of Galaxy Nexus) is above limit. There exist following workarounds but I'm not happy with them: 1) Create bitmap with Config.ARGB_?This causes banding for gradients and also antialiasing does not look superior. And also Config.ARGB_ is deprecated. 2) Generate bitmap in lower resolution and let layout upscale bitmap to appropriate size? This counteracts to idea of HD displays that should provide superior graphics quality 3) Created content provider that provides bitmap for RemoveViews bitmap and use method setImageViewUri()? BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. So my questions/conclusions: 1) What Google recommends to do? - Don't allow smaller widgets than 4x2 for HD displays? - Render them in poor quality? - Use content provider? 2) I'm really unhappy with widgets API and behavior Why widget behavior didn't change since Android 1.5 when there was single core/MDPI only devices. It reminds me Bill Gate's 640 kB or RAM is enough :-/ Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? Why there is not meaningful documentation about setImageBitmap() method limitations in JavaDoc? Thanks Tom -- 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
[android-developers] Re: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
if you really want to have some fun go listen to Brad Fitzpatrick at the video tab of developer.android ~ then if you agree in principle with general concept of where he tries to go with the discussion consider writing correct code for your apps and do not engage lookbacks . I am not going against what you say On Nov 21, 4:54 am, Tomáš Hubálek tom.huba...@gmail.com wrote: Hello, my app Make Your Clock Widget (https://market.android.com/details? id=net.hubalek.android.makeyourclock.pro) is generating widget content as custom drawn bitmap. As you probably know there is (not specified in documentation but existing) limit on size of bitmap sent via RemoteViews. It was possible to live with it (I just didn't allow bigger widgets) but with HD displays this stops working as even 4x2 widget contains too big bitmap as 294 wide * 146 high * 1.6^2 (density of SGS display) was bellow limit but 294 * 146 * 1.97^2 (density of Galaxy Nexus) is above limit. There exist following workarounds but I'm not happy with them: 1) Create bitmap with Config.ARGB_?This causes banding for gradients and also antialiasing does not look superior. And also Config.ARGB_ is deprecated. 2) Generate bitmap in lower resolution and let layout upscale bitmap to appropriate size? This counteracts to idea of HD displays that should provide superior graphics quality 3) Created content provider that provides bitmap for RemoveViews bitmap and use method setImageViewUri()? BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. So my questions/conclusions: 1) What Google recommends to do? - Don't allow smaller widgets than 4x2 for HD displays? - Render them in poor quality? - Use content provider? 2) I'm really unhappy with widgets API and behavior Why widget behavior didn't change since Android 1.5 when there was single core/MDPI only devices. It reminds me Bill Gate's 640 kB or RAM is enough :-/ Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? Why there is not meaningful documentation about setImageBitmap() method limitations in JavaDoc? Thanks Tom -- 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