Data Sheet

android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
<intent-filter>
<action
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
</manifest>
Initializing the SDK
Before you start to use the SDK, it’s required to be initialized. Additionally, after your app finishes using the
SDK it needs to release it explicitly. In the context of a typical Android Activity it may look like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
// init Terabee SDK
TerabeemSdk.getInstance().init(this);
}
@Override
protected void onDestroy() {
// release Terabee SDK
TerabeeSdk.getInstance().dispose();
super.onDestroy();
}
Connecting to a sensor
To receive data from a sensor(s) the SDK needs to connect to such first. That should be done in the
following way:
TerabeeSdk.getInstance().connect(new TerabeeSdk.IUsbConnect() {
@Override
public void connected(boolean success, TerabeeSdk.DeviceType
deviceType) {
}
@Override