# Usage
# Pinch
Tip
It is recommended that you set the SDK to test mode while developing. This will allow both you and us to verify that everything is integrated correctly. This setting persists until the application is removed from the manifest. Please note that test-mode interferes with the built-in privacy aggregator for location by sending GPS coordinates.
Add this within the <application>
element in AndroidManifest.xml
to enable test mode:
<meta-data
android:name="com.fluxloop.pinch.sdk.PRODUCTION_MODE"
android:value="false"/>
2
3
Note
References to PinchSDK can be imported with: using Com.Fluxloop.Pinch.Sdk
and using Com.Fluxloop.Pinch.Common.Model
.
# Available consents
Pinch.Consent.Surveys
Pinch.Consent.Analytics
Pinch.Consent.Campaigns
Pinch.Consent.Ads
2
3
4
# Granting consents
# Revoking consents
Revoking a consent requires an active network connection. The revoke method accepts an optional function which returns if the given consents were successfully revoked.
# Retrieve granted consents
# Start SDK
An overloaded method accepts a list of providers to use for collection data.
Note
The SDK will remember that it has been started, and subsequent calls to is unneccessary. If user clears or deletes app data, start has to be called again.
# Stop SDK
An overloaded method accepts a list of providers to disable for collecting data. If all previously granted providers are removed, SDK will be stopped.
# Retrieve SDK status
You can check if the SDK is started by calling:
# Send demographic profile
You can send your users demographic profile to the Pinch Platform by calling:
# Send custom data
WARNING
This function only accepts stringified json. If anything else is supplied, a swallowed exception will be thrown.
You can send custom data to the Pinch Platform by calling:
# Send metadata
WARNING
This function only accepts stringified json. If anything else is supplied, a swallowed exception will be thrown.
Note
This method performs a PUT request, replacing any previous values sent with the same type.
You can send metadata to the Pinch Platform by calling:
# Push tokens
MessagingId is the ID used by the Pinch Platform for sending notifications to the device (eg. FCM registration id). This can be done by calling:
# Retrieve privacy dashboard URL
The URL for the privacy dashboard, which contains all collected data, can be retrieved by calling:
# Deleted collected PII & data
You can delete all PII and collected data about a user by calling this method. It requires an active internet connection and accepts an optional closure to verify if the request was successfully sent.
← Permissions Changelog →