Chirp JavaScript SDK v1.0.0

James Nesfield
Chirp
Published in
2 min readOct 19, 2016

We’re happy to be able to announce the release of the first production-ready Chirp JavaScript SDK.

JavaScript opens up a world of new possibilities for Chirp across a huge range of new hosts, devices, and use cases.

For example, it’s now trivial to enable a webpage to send data and trigger interactions on a nearby Android or iOS device. Your web visitors can start chirping without needing any prior setup, logins, usernames, or passwords.

Dinu, who’s led development of the SDK here at Chirp HQ, says:

The internet is getting bigger and bigger, and browsers are the key interface to the web. With the JavaScript SDK, you can chirp any piece of data from the web to nearby devices: a URL, a remote control command, or even a secure authentication token.

Check out how we’ve been using the SDK in practice to sign in to our office Wi-Fi.

We’ve put together a simple demo, packaged with the SDK, to showcase the key functionality. View the live demo here, or skip straight to the SDK source code.

Chirp JavaScript SDK Demo: Play with the new functionality on a live site. (source code)

It’s quick and easy to get started. To play a chirp based on a particular identifier:

var chirpjs = new Chirpjs("YOUR_APP_KEY", function(err) {
if (!err) {
chirpjs.chirp("kingfisher");
}
});

And to create a chirp which embeds more complex data:

var data =
{
name: 'Martin Finch',
age: 34,
created_at: '2016-07-16T19:20:30.45'
}
chirpjs.create(data, function(err, chirp) {
if (err) {
console.error(err); return;
};
console.info('Created new chirp: ' + chirp.shortcode);
chirpjs.chirp(chirp.longcode);
});

Due to limited browser support for microphone input, this SDK is currently send-only and cannot receive chirps — we’re awaiting a couple of major browsers to catch up with the field.

Get started

--

--