-
Notifications
You must be signed in to change notification settings - Fork 140
Description
What is the issue?
Why api msg send one time but pusher event got message twice
Is it a crash report? Submit stack traces or anything that you think would help
no crash
Any improvements you suggest
remove redundant data push at the same time


sample code:
in Application
` pusherOptions = new PusherOptions().setCluster(cluster_pusher);
push = new Pusher(key_pusher, pusherOptions);
push.connect();`
in fragment activity
` if (AppControll.push.getConnection().getState().compareTo(ConnectionState.CONNECTING) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.CONNECTED) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.DISCONNECTING) == 0){
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.DISCONNECTED) == 0){
AppControll.push.connect();
}
if (AppControll.push.getConnection().getState().compareTo(ConnectionState.RECONNECTING) == 0){
}
if (AppControll.push.getChannel(Config.TOPIC_GLOBAL) == null){
channel = AppControll.push.subscribe(Config.TOPIC_GLOBAL);
}else{
channel = AppControll.push.getChannel(Config.TOPIC_GLOBAL);
}
channel.bind(Config.PUSHER_EVENT, new SubscriptionEventListener() {
@Override
public void onEvent(PusherEvent event) {
Log.i("Pusher", "Received event with data: " + event.getData()); <-- this received twice.
}
}
`
CC @pusher/mobile