Skip to content

This sample show how to use DataDomeSDK with the OKHTTP Interceptor and manual integration

License

Notifications You must be signed in to change notification settings

DataDome/AndroidSDK-Example

Repository files navigation

AndroidSDK-Example

Version Badge MIT

This sample show how to use DataDomeSDK with the OKHTTP Interceptor and manual integration (:warning:).

Usage

It is possible test the integration thanks to the multiple buttons.

User Agent

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")

Multiple requests

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.

Cache

It is possible to clear cache for triggering captcha again if you want to.

Back Button Behaviour

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.
Customization

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

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

About

This sample show how to use DataDomeSDK with the OKHTTP Interceptor and manual integration

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages