AndroidMinfest.xml配置

<!-- sdcard -->

<uses-permission android:name="android.permission.READ\_EXTERNAL\_STORAGE" />

<uses-permission android:name="android.permission.WRITE\_EXTERNAL\_STORAGE" />

<uses-permission android:name="android.permission.MOUNT\_UNMOUNT\_FILESYSTEMS" />

<!-- 联网 -->

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.CHANGE\_NETWORK\_STATE" />

<uses-permission android:name="android.permission.CHANGE\_WIFI\_STATE" />

<uses-permission android:name="android.permission.ACCESS\_NETWORK\_STATE" />

<uses-permission android:name="android.permission.ACCESS\_WIFI\_STATE" />

<uses-permission android:name="android.permission.CHANGE\_WIFI\_MULTICAST\_STATE" />

<uses-permission android:name="android.permission.WAKE\_LOCK" />

<!-- 定位 -->

<uses-permission android:name="android.permission.ACCESS\_COARSE\_LOCATION" />

<uses-permission android:name="android.permission.ACCESS\_FINE\_LOCATION" />

<!-- SDK使用的签名级别的权限 -->

<permission

android:name="应用包名.permission.IOTCLOUD\_MESSAGE"

android:protectionLevel="signature" />

<uses-permission android:name="应用包名.permission.IOTCLOUD\_MESSAGE" />

<!-- 消息服务 -->

<service

android:name="com.iot.cloud.sdk.api.MQTTService"

android:enabled="true"

android:exported="false"

android:permission="应用包名.permission.IOTCLOUD\_MESSAGE" />

<!-- 自定义广播接收者,接收消息和指令 -->

<receiver

android:name="广播接收者全限定类名"

android:enabled="true"

android:exported="false"

android:permission="应用包名.permission.IOTCLOUD\_MESSAGE">

<intent-filter>

<action android:name="com.iot.cloud.sdk.intent.MESSAGE\\_RECEIVED" />

</intent-filter>

</receiver>

Copyright & copy qinglianyun all right reserved,powered by Gitbook该文件修订时间: 2021-04-22 18:53:48

results matching ""

    No results matching ""