-
-
Save matzew/fd3f85a01aa3e46157c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimplePushClient client = new SimplePushClient("wss://push.services.mozilla.com"); | |
client.connect(); | |
client.register(new RegistrationListener() { | |
@Override | |
public void onRegistered(String channelId, String pushEndpoint) { | |
System.out.println(pushEndpoint); | |
} | |
}); | |
client.addMessageListener(new MessageListener() { | |
@Override | |
public void onMessage(Ack ack) { | |
System.out.println("Message received for " + ack); | |
} | |
}); | |
try { | |
Thread.currentThread().join(); | |
} | |
catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment