Device type
| Slug | android_app |
| Driver | Tad101Driver |
| Transport | Pusher Android SDK over Soketi |
SDK install
gradle
dependencies {
implementation 'com.pusher:pusher-java-client:2.4.4'
implementation 'com.google.android.gms:play-services-location:21.0.1'
}Kotlin implementation
kotlin
import com.pusher.client.Pusher
import com.pusher.client.PusherOptions
val options = PusherOptions().apply {
setHost("soketi.example.com")
setWsPort(6001)
isUseTLS = false
}
val pusher = Pusher("YOUR_APP_KEY", options)
pusher.connect()
val channel = pusher.subscribePrivate("private-device.YOUR_DEVICE_ID")
channel.bind("tad101.ping") { _, _, data ->
// respond with telemetry
}Sensors available on Android
| Sensor | Android API | TAD101 field |
|---|---|---|
| GPS location | LocationManager / Fused | lat, lng, alt, speed, direction |
| GPS accuracy | Location.accuracy | hdop (approximated) |
| Battery % | BatteryManager | battery_pct |
| Battery voltage | BATTERY_PROPERTY_VOLTAGE | battery_mv |
| GSM signal | TelephonyManager | gsm_signal |
| Cell info | getAllCellInfo() | mcc, mnc, lac, cell_id |
| Temperature | TYPE_AMBIENT_TEMPERATURE | temperature |
