Example usage for com.google.gwt.tok.client DeviceManager addDeviceStatusHandler

List of usage examples for com.google.gwt.tok.client DeviceManager addDeviceStatusHandler

Introduction

In this page you can find the example usage for com.google.gwt.tok.client DeviceManager addDeviceStatusHandler.

Prototype

public HandlerRegistration addDeviceStatusHandler(DeviceStatusHandler handler) 

Source Link

Usage

From source file:com.google.gwt.tok.test.client.model.TokModel.java

private void connect() {
    // Check devices
    DeviceManager deviceManager = tokBox.initDeviceManager(API_KEY);
    deviceManager.addDeviceStatusHandler(this);
    deviceManager.detectDevice();//from  w  ww  . ja  va 2  s .  com

    // Init session
    session = tokBox.initSession(DEV_SESSION_ID);
    session.addSessionHandler(this);
    session.connect(API_KEY, DEV_TOKEN);
}