This sample show how to use DataDomeSDK with the OKHTTP Interceptor and manual integration (:warning:).
It is possible test the integration thanks to the multiple buttons.
BLOCKINGUA: Request will be blocked each time by Datadome and a captcha will be shown. You can change add UserAgent to BLOCKUA by adding the header OKHTTP : val request = okhttp3.Request.Builder() .url(url) .addHeader("User-Agent", "BLOCKUA") .build() Manual Integration : addRequestProperty("User-Agent", "BLOCKUA")
You can perform multiple requests and the SDK will check every single request and retry all of them after the captcha check, and we make sure that the captcha is displayed only for the first request failure.
It is possible to clear cache for triggering captcha again if you want to.
It is possible to set a custom behaviour for the back action on captcha page:
- GO_BACKGROUND : Make your app go background. Its the default and recommended one.
- GO_BACK : Go back and cancel the call.
- BLOCKED : Back button make nothing.
You can customize endpoint in config.properties
file.
You can customize UserAgents directly in the activity.
Finally, it is possible to change datadome sdk key in the build.gradle
file of the app.
Documentation can be found here: https://docs.datadome.co/docs/sdk-android
Changelog can be found here: https://docs.datadome.co/docs/android-sdk-changelog