Android native apps¶
Only Android/Java is supported currently.
Requires at minimum Android 4.1. BLE on Android version before 6 may not always work properly. It depends on the model of your smartphone.
Setup¶
IoTize Maven repository can be found at http://repo.iotize.com/artifactory/gradle-release
Download the latest JAR or grab via Maven:
With Maven¶
<dependency>
<groupId>com.iotize.android</groupId>
<artifactId>iotize-device</artifactId>
<version>1.0.0-alpha.6</version>
</dependency>
<dependency>
<groupId>com.iotize.android</groupId>
<artifactId>iotize-client</artifactId>
<version>1.0.0-alpha.6</version>
</dependency>
With gradle file¶
repositories {
// ...
maven {
// Add iotize repository url
url "http://repo.iotize.com/artifactory/gradle-release"
}
}
// ...
dependencies {
// Add core library
implementation 'com.iotize.android:iotize-core:1.0.0-alpha.6'
// Add tap device client library
implementation 'com.iotize.android:iotize-client:1.0.0-alpha.6'
// Add device library
implementation 'com.iotize.android:iotize-device:1.0.0-alpha.6'
// OPTIONAL add User interface / extra service library
// implementation 'com.iotize.android:iotize-communicationapp-library:1.0.0-alpha.6'
// Smartphone to tap device communication libraries (you should only add the one you want to use)
// NFC
implementation 'com.iotize.android:iotize-device-com-nfc:1.0.0-alpha.6'
// Bluetooth Low Energy
implementation 'com.iotize.android:iotize-device-com-ble:1.0.0-alpha.6'
// Socket and Wi-Fi
implementation 'com.iotize.android:iotize-device-com-socket:1.0.0-alpha.6'
// Other communication libraries (may only work with a communication relay)
// Mqtt
// implementation 'com.iotize.android:iotize-device-mqtt:1.0.0-alpha.6'
// Websocket
// implementation 'com.iotize.android:iotize-device-websocket:1.0.0-alpha.6'
}