On Thu, May 17, 2012 at 4:27 PM, Dianne Hackborn <hack...@android.com> wrote:
> No, you should not be using it.  Why would you even *want* to use it?  I can
> only imagine using this to do things that are broken. :)

To clarify (and fix a typo in Kiran's post), he is working on adding
ordered broadcasts to LocalBroadcastManager from the Android Support
package, while maintaining maximum fidelity with the protocol used by
regular ordered broadcasts.

Most of this can go into (a fork of) LocalBroadcastManager without
issue. However, calling abortBroadcast() on a BroadcastReceiver throws
a RuntimeException ("BroadcastReceiver trying to return result during
a non-ordered broadcast") if you try to use abortBroadcast() without
having the Intent go through the standard sendOrderedBroadcast().

I have not seen Kiran's code -- I have merely been advising him so far
via email, as this is an itch I had been meaning to scratch myself.
Off the cuff, the options appear to be:

- use setOrderedHint(), despite it being labeled as "internal", or

- attempt to override the internal checkSynchronousHint() to not raise
the RuntimeException, or

- try to fork BroadcastReceiver and use a forked edition with
LocalBroadcastManager and ordered-broadcast support, or

- abandon LocalBroadcastManager entirely and create a workalike that
supports ordered "pseudocasts" or some such

Certainly, I am up for other suggestions.

Thanks!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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

Reply via email to