# Usage

# Pinch


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. Refer to native Android documentation to see how to enable this.

# Available consents


# Granting consents

# Revoking consents

# Retrieve granted consents

# Start SDK


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

# Set Adid

# Retrieve SDK status

# Send demographic profile

# Send custom data


This function only accepts stringified json. If anything else is supplied, a swallowed exception will be thrown.

# Send metadata


This function only accepts stringified json. If anything else is supplied, a swallowed exception will be thrown.


This method performs a PUT request, replacing any previous values sent with the same type.

# 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 terms URL

The URL for privacy terms can be retrieved by calling:

# Retrieve privacy dashboard URL

The URL for the privacy dashboard, which contains all collected data for given consent, can be retrieved by calling:

# Convenience methods for iOS

Convenience method for requesting system access to bluetooth and motion is available for iOS:

# Delete 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.

# Pinch Messaging Center

Retrieve incoming messages to user from Pinch.


All fields in PinchMessage except created, expiry and opened is nullable.

# Pinch Motion Tracking

# Start tracking motion

Minimum SDK version: 1.3.0

# Android

Add the following permission to your applications manifest: <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION"/>

If your application targets Android 9 (API level 28) or lower, the system will auto-grant the required permission as long as the permission line is present in manifest. If you're application targets an API level higher than 28, you need to explicity request Manifest.permission.ACTIVITY_RECOGNITION during onboarding. If this doesn't work, you may have to explicitly request com.google.android.gms.permission.ACTIVITY_RECOGNITION instead.

# iOS

Add the following key and value to your applications Info.plist:

<string>Text to show in system dialog during permission request</string>

Motion data will be collected alongside location updates, which requires the location provider to be enabled.

A convenience method to request motion permission is provided for iOS only: await Pinch.requestMotionPermission();

# General

Motion tracking can be enabled after aquiring the required permissions. This is done by calling: await Pinch.startMotionProvider();