title: Confusion with Sync gateway Pull Replication on Android
body: <p>I am trying to setup Channel based Pull replication on a Android device. I am using the Grocery-Sync Android client to push some data and retrieving the same through my Android client(push and Pull replication).</p>
  
  <p>Here's my database configuration from the sync gateway file:</p>
  
  <pre><code>"cb":{
    "server":"http://172.17.0.5:8091",
    "users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } },
     "allow_empty_password": true,
   "sync":``function(doc){
          if(doc.type == "LatestUpdate"){
                  console.log("Inside LatestUpdate");
              channel(doc.kidId);
          }
          else{
              channel(doc.channels);
          }
      }
  </code></pre>
  
  <p>I have set custom property called kidId(hardcoded for the time being) while pushing the data from the Grocery-sync app. The Push replication works alright. Even it pushes to the correct channel as is evident from the logs:</p>
  
  <p><code>Doc "afd8c40b-4431-49ab-be08-c87e409ee912" in channels "{2bea2709e58a49329de59c47d98535b}"</code>
  Now, when I pull the data from my app, even though I have explicitly set a different channel, the logs suggest that it has still pulled the data.</p>
  
  <p>Here's my Pull Replication code:</p>
  
  <pre><code>Replication pull = myApp.getDatabase().createPullReplication(url);
  List&lt;String&gt; channels = new ArrayList&lt;&gt;();
  channels.add("xyz");
  pull.setContinuous(true);
  pull.start();
  pull.addChangeListener(this);
  pull.setChannels(channels);
  </code></pre>
  
  <p>Is this correct behaviour or is something incorrect at my end? My assumption is that the Pull replication code shouldn't even have been looking at the data coming in from a different channel. Is that assumption correct? </p>