Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.pusher.client.Pusher;
- import com.pusher.client.channel.Channel;
- import com.pusher.client.channel.SubscriptionEventListener;
- PusherOptions options = new PusherOptions();
- options.setCluster(" ");
- Pusher pusher = new Pusher("f ", options);
- Channel channel = pusher.subscribe("my-channel");
- channel.bind("my-event", new SubscriptionEventListener() {
- @Override
- public void onEvent(String channelName, String eventName, final String data) {
- System.out.println(data);
- }
- });
- pusher.connect();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement