While trying to implement SafetyNet, I've added this dependency:
implementation 'com.huawei.hms:safetydetect:6.3.0.301'
And also added the permission to AndroidManifest.xml:
<uses-permission android:name="com.huawei.permission.SECURITY_DIAGNOSE"/>
But this somehow doesn't work as expected:
E/RootDetect: `isRoot` exception : Must have `com.huawei.permission.SECURITY_DIAGNOSE` permission.
Neither user `10200` nor current process has `com.huawei.permission.SECURITY_DIAGNOSE`.
Also below Apps & services > Permissions > View all permissions, it is not listed - all the others are being merged. Are there any further conditions or is the permission possibly being stripped out while merging? The AGP version is 7.1.2.
The strange thing is, that I still get the error message, when commenting out the dependency.