Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import com.pusher.client.Pusher;
  2. import com.pusher.client.channel.Channel;
  3. import com.pusher.client.channel.SubscriptionEventListener;
  4.  
  5. PusherOptions options = new PusherOptions();
  6. options.setCluster(" ");
  7. Pusher pusher = new Pusher("f ", options);
  8.  
  9. Channel channel = pusher.subscribe("my-channel");
  10.  
  11. channel.bind("my-event", new SubscriptionEventListener() {
  12. @Override
  13. public void onEvent(String channelName, String eventName, final String data) {
  14. System.out.println(data);
  15. }
  16. });
  17.  
  18. pusher.connect();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement