Filtered pull from Sync Gateway(Android)

I created a document with channels[ “vitalsigns” ] and Sync,
Now, when pullReplication.setChannels(Arrays.asList("vitalsigns"));, there is no document downloaded tagged as “vitalsigns”. How?

Yet according to Filtered pull from Sync Gateway,

you can filter it further by creating an array of channel names and setting it as the value of the channels property of a pull Replication.

Does the user account making the request have access to the vitalsigns channel?

If you don’t set the channels of the replication, does the document get downloaded?

The user account have no explicit access to vitalsigns. So i have to include it in the creation of user?

There are a couple of ways to give a user access to a channel. You can do it explicitly via the admin API, or by calling access(“username”,“vitalsigns”) from your sync function.

1 Like

Can you give me a simple example of that sync function?

The documentation for the access function is here and there is an example included there. Basically, grant the user access to the channel in the same place you add the document to the channel. Does this help clear things up?