工程配置

环境准备

Android studio 3.0

Android 手机系统4.0以上版本

工程配置

  • 依赖配置

    SDK将以aar的方式提供出来,放在工程的libs目录下面,并在gradle中添加如下依赖

implementation "com.android.support:appcompat-v7:28.0.0"
implementation(name: 'AndMuSDK', ext: 'aar')
implementation('org.simpleframework:simple-xml:2.7.1') {
    exclude module: 'stax'
    exclude module: 'xpp3'
    exclude module: 'stax-api'
}
implementation 'com.squareup.okhttp3:okhttp:3.14.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation('com.journeyapps:zxing-android-embedded:3.6.0') {
    exclude group: 'com.android.support'
}
  • 权限配置  在AndroidManifest.xml文件中添加如下配置
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
    android:name="android.hardware.camera"
    android:required="false" />
<uses-feature
    android:name="android.hardware.autofocus"
    android:required="false" />
  • 混淆配置
-ignorewarnings
-dontshrink
-keep interface * {
  <methods>;
  <fields>;
}

-keepclasseswithmembernames class * {
    native <methods>;
}

-dontwarn com.cmcc.**
-dontwarn com.v2.**
-dontwarn com.v3.**
-dontwarn com.tencent.**
-dontwarn com.cmmf.**
-dontwarn com.google.**
-dontwarn com.clplayer.**
-dontwarn org.apache.commons.**
-dontwarn com.ont.media.player.**

-dontnote com.v2.**
-dontnote com.v3.**
-dontnote com.google.**
-dontnote com.tencent.**
-dontnote com.cmmf.**
-dontnote com.cmcc.**
-dontnote com.clplayer.**
-dontnote com.arcsoft.**

-keep class * extends android.app.Activity
-keep class * implements java.io.Serializable{*;}
-keep class com.cmcc.andmusdk.AndMu { *; }
-keep class com.cmcc.andmusdk.base.restapi.** { *; }
-keep class com.cmcc.andmusdk.base.utils.** {*;}
-keep class com.cmcc.andmusdk.camera.utils.** {*;}
-keep class com.cmcc.andmusdk.camera.restapi.** {*;}
-keep class com.cmcc.andmusdk.camera.closeli.restapi.** {*;}
-keep class com.cmcc.andmusdk.camera.session.** {*;}
-keep class com.cmcc.andmusdk.base.config.AMGlobal {*;}
-keep class com.cmcc.andmusdk.camera.AMCamera {*;}
-keep class com.cmcc.andmusdk.camera.player.** {*;}
-keep class com.cmcc.andmusdk.camera.widget.** {*;}
-keep class com.cmcc.andmusdk.camera.closeli.** {*;}
-keep class com.cmcc.andmusdk.base.net.** {*;}
-keep interface com.ont.media.player.** {*;}
-keep class com.ont.media.player.** {*;}
-keep class com.v2.** {*;}
-keep class com.v3.** {*;}
-keep class com.clplayer.** {*;}
-keep class com.cmmf.** {*;}
-keep class com.closeli.** {*;}
-keep class com.onenet.** {*;}
-keep class com.arcsoft.** {*;}
-keep class com.tencent.** {*;}
-keep class org.simpleframework.** {*;}
-keep class com.cmcc.andmusdk.camera.cmiot.handler.** {*;}
-keep class com.cmcc.andmusdk.camera.onenet.** {*;}
-keep public class com.v2.settings.bean.** {
    <fields>;
    <methods>;
}