start
method:start
method takes an OguryConfiguration
object as parameters. The OguryConfiguration
is built from its Builder
which takes the following parameters:ask
method in the onCreate
method of your Activity
.ask
method synchronizes the consent signal and makes it available through the SDK methods.ask
method as follows:ask
method takes the following parameters:Activity
.ask
method must be called at each launch of your application to be sure to have an up-to-date consent status.edit
method behaves the same way as the ask
method but enforces the display. If an error occurred, nothing is displayed to the user. In this case, you need to handle the error to inform the user.edit
method takes the following parameters:Activity
.edit
method will return an error in the following cases:ask
method has completed. Otherwise this method returns true
by default.OguryConsentListener
interface to listen to consent signal changes.OguryConsentListener
exposes the following methods:onComplete
Answer
. Learn more about how to handle the user consent if you have other vendors' SDKs processing user data on Ogury Choice Manager documentation.onError
OguryError
that contains the reason of the failure.onComplete
method of the OguryConsentListener
interface, you can get the answer of the user through theAnswer
object. The Answer
has one of the following values:FULL_APPROVAL
PARTIAL_APPROVAL
REFUSAL
NO_ANSWER
ask
or an edit
, the onError
method of the OguryConsentListener
is called. This method provides an OguryError
object that contains an error code and an error message.getErrorCode
. You can retrieve a more explicit message by calling the getMessage
method.OguryChoiceManagerErrorCode
object. For example, you can check if error occurred because there is no Internet connection by usingNO_INTERNET_CONNECTION
error code as following:OguryChoiceManagerErrorCode
object:NO_INTERNET_CONNECTION
0
ASSET_KEY_UNKNOWN
1
BUNDLE_NOT_MATCHING
2
SERVER_NOT_RESPONDING
3
SYSTEM_ERROR
4
REGION_RESTRICTED
1000
TIMEOUT_ERROR
1002
FORM_ERROR
1003
PARSING_ERROR
1004
FAIR_CHOICE_ERROR
1005
EDIT_DISABLED_USER_HAS_PAID
1006
EDIT_DISABLED_DEVICE_ID_RESTRICTED
1007
EDIT_DISABLED_GEORESTRICTED_USER
1008