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

Multi subscribe #140

Open Lemniscate317 opened 7 years ago

Lemniscate317 commented 7 years ago

I put the subscribe in Onconnect.when connect success,it will subscribe the collecion.

String flag = null;

onConnect(){
  if (flag !=null)return
  flag = singleinstance.subscrbe("any collections")
}
onDisconnect(){
  flag =null;
}

above is the code what i subscribe.

now the ques is:in local test env,i see no multi subscribe. but in the online env,in the monitor,the logs show that the app always subscribe the method, i am confuse,so i ask the ques in here,hope your reply!