Android SDK FAQ
My app crashes with OneginiConfigNotFoundException.
The Android SDK needs a configuration class, that implements the OneginiClientConfigModel
interface.
You can pass it explicitly via the OneginiClientBuilder#setConfigModel()
method. If the method was not called (or the provided value is null), the Android SDK will use reflection and the Context.getPackageName()
method to search for the <your.application.package>.OneginiConfigModel
class that implements the OneginiClientConfigModel
interface. If the proper class can't be found, the Android SDK will throw a OneginiConfigNotFoundException
exception.
My app crashes with OneginiInitializationException("Unable to decrypt internal data...")
To improve security of internal data, the Android SDK encrypts all storage files. The encryption functionality assumes that some properties of the application won't change during the lifetime of the app. For example, the application ID that is defined in OneginiClientConfigModel
should never change after the initial production release. Hoverer, sometimes you may change such properties during app development. After such change, the Android SDK will not be able to load internal data that was stored before the change. If you want to force the Android SDK to work again after such change, you can remove the app's internal data from the device (go into Android's Settings -> Apps and clear your app's data) or reinstall the app itself.
How can I disable root/debug detection?
check the SecurityController description.
How can I check network communication logs?
Check the SecurityController description.
Push notifications delayed, heartbeat interval not reliable.
If you are using push messaging, you need to be aware that the connection with the Google push service is checked infrequently. This can cause delays in the reception of the push messages, since the connection can be broken without the device being aware of that. To prevent this, either the application itself needs to check for the connection to be alive, or you can advise your users to install an application like Push Notifications Fixer.
The KeyStore exception warning
Sometimes during the DCR process the Android system creates a warning log with a stacktrace:
W/KeyStore: KeyStore exception
android.os.ServiceSpecificException: (code 7)
at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
...
This warning is caused by a system bug that was reported here: https://issuetracker.google.com/issues/77664363 According to Google, the issue should already be resolved, however it is still reproducible on many modern devices. The warning does not influence the DCR process, which is still able to complete with success, therefore we recommend ignoring the warning.
Failed to transform bcprov-jdk15on
Android SDK v11.2.0+ uses the org.bouncycastle:bcprov-jdk15on
library that can cause a build error when used with Android Gradle Plugin 4.x or earlier. The error log looks like the one below:
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for JetifyTransform: ../org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
> Failed to transform '../org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
This is a bug in the Android Gradle Plugin that should be fixed in Android Gradle Plugin 7.0
If you want to use the Android SDK but cannot update to the latest AGP yet, the workaround suggested in the link above is to add the following setting to your gradle.properties
file:
android.jetifier.blacklist = bcprov-jdk15on