Create Chirp offline - Android

Posted in General by Abhishek Thu Feb 02 2017 03:35:24 GMT+0000 (UTC)·2·Viewed 308 times

How can i create chirp offline ?
Mike Smales
Feb 2, 2017

Hi Abhishek,

Thanks for your question. You can certainly use Chirp to send messages offline.

To send a chirp offline, use the following method:

chirpSDK.chirp(new Chirp("parrotbill"));

Then to receive a chirp offline, you need to set a chirp listener, and the 'onChirpHeard()' callback will be triggered when a Chirp is received:

chirpSDK.setListener(new ChirpSDKListener() {
    @Override public void onChirpHeard(Chirp chirp) {

    @Override public void onChirpHearStarted() {
    @Override public void onChirpHearFailed() {
    @Override public void onChirpError(ChirpError chirpError) {

You can find further information about these methods in our developers documentation here:

Also, a good starting point is to look at the 'GemSwap' code sample that is packaged with the latest Android SDK (v2.3.1) - this demonstrates how to send chirps offline.

Mike Smales marked this as solved
Markdown is allowed