产品动态
dependencies {implementation 'com.tencent.iot.hub:hub-device-android-core:x.x.x'implementation 'com.tencent.iot.hub:hub-device-android-service:x.x.x'}
dependencies {implementation project(':hub:hub-device-android:iot_core')implementation project(':hub:hub-device-android:iot_service')}
{"PRODUCT_ID": "","DEVICE_NAME": "","DEVICE_PSK": "","SUB_PRODUCT_ID": "","SUB_DEV_NAME": "","SUB_PRODUCT_KEY": "","TEST_TOPIC": "","SHADOW_TEST_TOPIC": "","PRODUCT_KEY": ""}
hub/hub-android-demo/src/main 路径下创建 assets 目录并将设备证书、私钥放置在该目录中。private String mDevCertName = "YOUR_DEVICE_NAME_cert.crt";private String mDevKeyName = "YOUR_DEVICE_NAME_private.key";
mMqttConnection = new TXGatewayConnection(mContext, mBrokerURL, mProductID, mDevName, mDevPSK,null,null ,mMqttLogFlag, mMqttLogCallBack, mMqttActionCallBack);mMqttConnection.connect(options, mqttRequest);
文档反馈