Question 1: For SDK encryption: Android application ID, expiration time encryption, SDK initialization return value is “-5”?
Reason：The verification failed.
(1) Ensure that the application has permissions of read and write SD card.
Method: Add permissions in Mainfest.xml, Android 6.0 or above needs to be dynamically adapted.
(2) Replace the deepcam.key file
Method: Refer to the demo directory app/src/main/assets/key/deepcam.key
(3) Modify the application package name
Method: Open the “build.gradle” file in the App directory and find the “application Id”, and setting it to the registered package name.
- Registered package name
2. Replace the package name
(4) Mainfest.xml increases the key value
Method: Refer to <Meta-data> in Mainfest.xml in the demo, and the value is the registered App key value.
(5) Make sure you can get the cpuinfo information of the android device.
Method: The “Adb” command executes the “adb shell cat /proc/cpuinfo”, which can check the cpu information. In this step, you have to ensure the Serial number is not empty. The verification would fails if it is empty,.
(6) Make sure the device Mac address is not empty
Method: Entering the android device settings option, view “About Device”, view “WLAN MAC Address” or “Ethernet MAC Address”, and make sure at least one has a value.
(7) Clear the cache and restart the app.
Method: Delete the /sdcard/deepcam directory, clear the cache, and restart the app, which can prevent authentication failure caused by improper use of deepcam.key.
DeepCam AI open Platform Link: https://ai.deepcam.cn