The TrustPid services can be started by using this piece of code:
FunnelConnectSDK.trustPid().startService()
FunnelConnectSDK.trustPid().startService(false, null , null);
If you want to retrieve/use information such as mtid and atid, you can start the service with closure
FunnelConnectSDK.trustPid().startService(dataCallback = {
println("atid: " + it.atid + "mtid: " + it.mtid)
}, errorCallback = {
error.printStackTrace()
})
FunnelConnectSDK.trustPid().startService(false, idcData -> {
System.out.println("atid: " + idcData.atid + "mtid: " + idcData.mtid)
} , error -> {
error.printStackTrace();
});
The TrustPid Services requires the user consent, without consent acceptance, no API calls will be made hence the TrustPid service will not start:
You can use the isStub
parameter which is false by default if not passed in Kotlin
to test the TrustPid Service if you don’t have an eligible SIM card.
This function returns a boolean value indicating the consent status of the user (accepted or rejected).
FunnelConnectSDK.trustPid().isConsentAccepted()
FunnelConnectSDK.trustPid().isConsentAccepted();
You can use this function to check the user’s consent before showing a dialog asking for his consent.
This function can be used after showing a prompt/alert to the user to accept the consent for the TrustPid service.
FunnelConnectSDK.trustPid().acceptConsent()
FunnelConnectSDK.trustPid().acceptConsent();
This function does not show any alert, and you should use an alert with the look and feel relative to your application theme to ask for the user’s consent.
With this function, we can reject the user’s consent, if the user changed his mind or if we want to reset the user’s consent.
FunnelConnectSDK.trustPid().rejectConsent()
FunnelConnectSDK.trustPid().rejectConsent(null, null);
Because this is an API call, you might want to do something when the request comes with a response, either success or failure, so you can use the same function above but with success and failure closures.
FunnelConnectSDK.trustPid().rejectConsent(successCallback = { ... }, errorCallback = { ... })
FunnelConnectSDK.trustPid().rejectConsent(() -> { ... }, error -> { ... });
This function does not show any alert, and you should use an alert with the look and feel relative to your application theme to ask for the user’s consent.
This is the so-called MarTechID, a persistent identifier for the user of a Data Controller. It is a Sha256 (64 bytes) string, which remains persistent for 90 days (or what has been agreed on and set).
Correspond to the AdTechID string value with a telco-specific acronym as a suffix delimited by a hyphen. The telco acronym is required by the authorized DSPs to select the correct decryption key to decrypt the AdTechID and get to the clear umid value which can then be used for audience matching. The AdTechID can be passed via OpenRTB or other protocols to deliver targeted ads on 3rd party media.
Example AdTechID with test stub telco:
acronym: "UQbjXiNbTpMGjKdI2+cRoHAm7OlyzNSc2uKwGKf0L3BP36eJu16ajJ93Pn52qFbkoZfEySysH/mdaKvHC/BKgA==-ndye"