delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

Subscription with args #22

Closed revmen closed 9 years ago

revmen commented 9 years ago

It looks like it's currently not possible to create a subscription using arguments, and you must always subscribe to a publication that has no arguments. Is that correct?

As in arg1, arg2...

If this is the case, it would be very beneficial to add that functionality. I think it's pretty typical to subscribe to a subset of documents based on some chosen value so that an entire collection is not sent over the wire.

revmen commented 9 years ago

Oops, I just poked through the source and saw that it is implemented. It's just not in the docs (that I saw).

This works like expected: String subscriptionID = mMeteor.subscribe("collection", new Object[]{"arg1"});

ocram commented 9 years ago

The documentation has been updated in https://github.com/delight-im/Android-DDP/commit/ac77e746f2fd4b9c6deee0245e46dd4094cc6d4c

Thank you!