Developer

Home / Developer

Unveiled Ring SDK @SXSW

Check out the Ring Game which was developed using the SDK.(the SDK is not public yet)

About API/SDK

We will provide an SDK for developers in Summer 2015.

Sign up for Updates

Sign up so we can let you know about new SDK

.full-width-568ca84f474d8 { min-height:100px; padding:10px 0 10px; margin-bottom:0px; background-color:#000000; } #background-layer--568ca84f474d8 { background-position:left top; background-repeat:repeat; ; } .full-width-568ca84f474d8 .mk-fancy-title.pattern-style span, .full-width-568ca84f474d8 .mk-blog-view-all { background-color: #000000 !important; }
Open URI
Available Now!
iOS SDK
Coming Soon!
Android SDK
Coming Soon!
Ring for VR
Coming Soon!
Open URI

What is Open URI?

Open URI allows you to create your own actions.

How Open URI works

By adopting a widely used application protocol (HTTP),  Open URI allows you to use the Ring with various web services and hardware.

One Gesture Rule

Let’s Start!

Open URI can be added on the app. An action can be created by entering the URI and programming the settings on the server side.

Sample Code

Using Keynote with the Ring!

The Ring has an action called OpenURI as a function for developers. With this, you can send HTTP GET through gestures. As an example, we will show you how to control Keynote slides using this action.

Steps:

1. Open the computer’s Server App from the Ring App using OpenURI.

2. Send the right and left arrow key codes from the Server App using AppleScript.

AppleScript

By using the “osascript” command, you will be able to run AppleScript from anywhere that can run shell scripts. It should look something like this:

# Activate Keynote
$ osascript -e ‘tell application “Keynote” to activate’
# Send key code
$ osascript -e ‘tell application “System Events” to key code 124′

node, express, npm

We will use Node + Express. Please install Node, Express,  and npm.

The code to get AppleScript from express is as follows:

// app.js

var express = require('express');
var app = express();

function sendkey(code, callback) {
 var exec = require('child_process').exec;
 exec("osascript -e 'tell application \"keynote\" to activate\'", function(err, stdout, stderr) {
 exec("osascript -e 'tell application \"system events\" to key code " + code + "'", function(err, stdout, stderr) {
 callback();
 });
 });
}

app.get('/right', function (req, res) {
 sendkey(124, function() {
 res.sendstatus(200);
 });
});

app.get('/left', function (req, res) {
 sendkey(123, function() {
 res.sendstatus(200);
 });
});

app.listen(3000);
// package.json
{
"name": "ring-express-keynote",
"version": "0.0.1",
"private": true,
"scripts": { "start": "node app" }, "
dependencies": {
"express": "*"
}
}
Using the above 2 files, execute the command as follows:
$ npm install
$ npm start

Open Keynote, then type the following in your browser’s address bar. Keynote should activate.

http://localhost:3000/right

Ring App

Now add 2 OpenURIs on your Ring App and set them as follows:

http://(Your Mac IP Address):3000/left
http://(Your Mac IP Address):3000/right

Result

We prepared two slides for this example.

You can also control Chrome and more using AppleScript!

Videos

Keynote with Ring

AirConditioner with Ring

IRKit with Ring

Launch apps with Ring

#mk-tabs-568ca84f4f59e .mk-tabs-tabs li.ui-tabs-active a, #mk-tabs-568ca84f4f59e .mk-tabs-panes, #mk-tabs-568ca84f4f59e .mk-fancy-title span{ background-color:#fff; }
Open URI