Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Is there any ready-to-use mechanism in Android to accomplish this?</p> </blockquote> <p>That depends on what part of the problem you wish to consider being "ready-to-use". Pushing data to another app is handled via broadcast <code>Intents</code>.</p> <blockquote> <p>I have looked at intent broadcasts, but it seems as if I pack data as a parcelable I don't have a filter function built in. I will always have to send all of the data in one parcelable and then unpack and extract the small part that I am interested in from there(?)</p> </blockquote> <p>Your app would do the filtering, then send out broadcasts of the matches. This is a typical approach taken by broker-based "pub/sub" push models: the broker does the filtering, sending out only the relevant messages to subscribers over the communication channel. For example, GCM does not send <em>every</em> message destined for <em>every</em> device <em>to</em> every device and expect devices to do their own filtering -- the GCM servers do the filtering, then send the specific messages to the specific devices.</p> <p>In some cases, you may be able to leverage <code>IntentFilter</code> capabilities to do the filtering for you. For example, suppose a message really represents a file. Files have MIME types. You could include the MIME type of the file in the <code>Intent</code> being broadcast, and the receivers could specify the MIME type(s) they are interested in via their filters. Receivers would only get messages from relevant broadcasts.</p> <p>However, for more arbitrary sorts of subscriptions (e.g., "send me all messages that have certain values in certain JSON-encoded objects"), you would have to implement the filtering yourself.</p> <blockquote> <p>Can a ContentProvider push messages onto a registered recipient using a query as a filter?</p> </blockquote> <p>No, sorry.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload