I’m using the latest version of the DeepAR SDK (Android 5.2.0) in an Android project with targetSDK 33 (Android 13), and I didn’t receive the initialized() callback after initializing the SDK.
However, when I downgrade the Android project to targetSDK 32, the DeepAR SDK successfully calls initialized() and everything works fine.
I suspect that the issue might be related to the android.permission.WRITE_EXTERNAL_STORAGE permission. Perhaps the SDK is still expecting that permission, even though it has been deprecated for targetSDK 33.
I have installed an example project from the archive and added my LicenseKey.
The example project is targeting Android API version 30 with compileSdkVersion 30. I have successfully run the current project on my test device (Android 13, samsung tab s8 ultra). After installation, I granted all the necessary permissions (CAMERA, RECORD_AUDIO, WRITE_EXTERNAL_STORAGE). The app works well, with the library initialized and the filter applied to my camera.
I made some changes to target the latest Android version (Android API 33):
Changes in build.gradle (compileSdkVersion 33, targetSdkVersion 33).
Changes in the AndroidManifest.xml - added android:exported=“true” to MainActivity.
Added the following line Getting Started | DeepAR
uses-native-library
android:name=“libOpenCL.so”
android:required=“false”
I also updated the Gradle version for support uses-native-library tag: android/build.gradle: => classpath 'com.android.tools.build:gradle:7.1.2'android/gradle/wrapper/gradle-wrapper.properties: => distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
and added
uses-feature
android:name=“android.hardware.camera”
android:required=“false”
for the camera permission.
I uninstalled the previous version of the app from the device.
I installed the new version and granted permissions (CAMERA, RECORD_AUDIO). The WRITE_EXTERNAL_STORAGE is not supported with target API 33… The DeepAR library is not initialized.
However, if I follow steps 1 and 2 without uninstalling the app (step 3), it means that I granted permissions with target API 30 and then just updated the app. The app will still have those permissions, and it will work well.
So, I noticed an issue that the latest DeepAR Android SDK release does not target the latest Android version yet, and it is waiting for the WRITE_EXTERNAL_STORAGE permission.
Could you please connect to the topic Android developer ASAP to check the information I provided and confirm if it is indeed a problem? It’s possible that I might have missed something on my end.
It’s important to know for me ASAP.
When do you plan to release the new version that addresses this issue?
Please let me know if you need any further information.
We have updated our quickstart to work with Android target API level 33. Please check if it works for you.
My assumption was that you were testing on a device that didn’t have API level 33, and for those devices you still need WRITE_EXTERNAL_STORAGE permission.
Hi @Disho
I’m using Samsung Galaxy Tab S8 with Android 13.
I’ve tested quickstart that you posted above on my device and still have the same problem.
(I see that the quickstart project uses the 5.3.0 version. (newest one). )