Push message to any browser in 3 steps
What you’ll need
Sign up a free GoEasy account.
Add an application free to obtain app key.
About 9 minutes.
Step 1: Import GoEasy
Javascript
Java
WARNING:
1. Please don't download goeasy.js as your local js, GoEasy provides dynamic goeasy.js according to different browsers.Directly use local goeasy.js may get browser compatibility issues.
2. If your application needs to support Windows XP users, please use HTTP to load goeasy.js. GoEasy upgraded all SSL certificates to SHA-2 on Sep 22th 2016,and all Windows XP users will not be able to connect GoEasy with HTTPS.
:
<script type="text/javascript" src="http(s)://cdn.goeasy.io/goeasy.js"></script>

<script type="text/javascript">
        var goEasy = new GoEasy({
             appkey: 'Your app key here'
        });
        //GoEasy-OTP can protect your appkey well, more details see: GoEasy-Reference
</script>
                      
Javascript
Java
Option 1. Manually download
:
Download sdk: goeasy.jar
Add dependency libraries: gson.jar slf4j-api.jar
Option 2. Maven:
Add goeasy maven repository to your pom.xml:
:
<repositories>
    ...
    <repository>
        <id>goeasy</id>
        <name>goeasy</name>
        <url>http://maven.goeasy.io/content/repositories/releases/</url>
    </repository>
</repositories>
and then add dependency:
:
<dependencies>
    ...
    <dependency>
        <groupId>io.goeasy</groupId>
        <artifactId>goeasy-sdk</artifactId>
        <version>0.3.5</version>
    </dependency>
</dependencies>
GoEasy goEasy = new GoEasy("appkey");
Step 2: Push message
GoEasy supports you push a message from either server or client (javascript, android, iOS).
2.1 Push message by Rest API
You could post a http request to call GoEasy Rest API, and whatever language your application is created. For java, you also can choose our sdk to help you to push a message.
Rest API (Php, iOS, .Net, Ruby ...)
Java
URL:
http(s)://goeasy.io/goeasy/publish
Method:
Post
Parameters:
Name Required Description
appkey Yes Your app key
channel Yes Target channel name
content Yes The message you want to publish
Rest API (Php, iOS, .Net, Ruby ...)
Java

goEasy.publish('demo_channel', 'Hello world!');
2.2 Push message from browser
Javascript
goEasy.publish({
    channel: 'demo_channel',
    message: 'Hello world!'
});
Step 3: Receive message on browser
Javascript
goEasy.subscribe({
    channel: 'demo_channel',
    onMessage: function(message){
        alert('Meessage received:'+message.content);
    }
});