Android Permissions Detailed for MOCA SDK

Android Permissions Detailed for MOCA SDK

The MOCA SDK requests a variety of permissions, some of them being optional. Here is a breakdown of each permission and their effect on the SDK:

 

PermissionExplanation

android.permission.INTERNET

Allows MOCA SDK to open network sockets so it has connectivity to the internet. 

android.permission.ACCESS_NETWORK_STATE

MOCA SDK uses it to track user connectivity and enforce the "WiFi Only" setting.

android.permission.ACCESS_WIFI_STATE

Removing it will prevent MOCA SDK from scanning nearby Wi-Fi networks. Wi-Fi beacon feature won’t be available.

android.permission.BLUETOOTH

MOCA SDK needs it in order to access Bluetooth hardware and scan for nearby bluetooth beacons.

android.permission.BLUETOOTH_ADMIN

MOCA SDK needs it in order to use Bluetooth API calls to scan for nearby bluetooth beacons.

android.permission.RECEIVE_BOOT_COMPLETED

Used in Android versions prior to 8.0 to automatically start up the MOCA SDK after the phone reboot.

android.permission.WAKE_LOCK

Used in Android versions prior to 8.0 to prevent the CPU from sleeping while performing certain tasks such as Wi-Fi Network scanning or handling remote push notifications.

android.permission.VIBRATE

Removing it will prevent MOCA SDK from providing haptic feedback for the received Experiences.

android.permission.ACCESS_FINE_LOCATION

User granted. Removing it will prevent MOCA SDK from detecting, with fine location precision, geofences, bluetooth beacons, Wi-FI networks, and track location points.

android.permission.COARSE_LOCATION

User granted. Removing it will prevent MOCA SDK from detecting geofences, bluetooth beacons, Wi-FI networks, and track location points with coarse location setting.

android.permission.READ_PHONE_STATE

Required to read the full list of carriers of the SIM cards installed on the phone.

android.permission.CHANGE_WIFI_STATE

Removing it will prevent MOCA SDK from scanning for Wi-FI Networks.

com.google.android.c2dm.permission.RECEIVE

Required in order to receive remote push content from GCM / FCM.
    • Related Articles

    • Android 10 and MOCA SDK

      MOCA Android SDK has been tested in the Android 10 OTA. Find the notes for this version below: Android 10 introduces a new permission model where the user can choose between “When in Use” or “Always” location permission. The SDK works correctly with ...
    • Android Studio Instant Run and MOCA SDK

      It is recommended to turn off Instant Run in Android Studio. Instant Run uses portions of the SDK that might not be necessary for your integration and give you false error and warning messages.   Example stack trace when using Instant Run: I/art: ...
    • Reading MOCA SDK Logs

      The logs related to the MOCA SDK are very helpful to find configuration errors. The log starts with these two lines: I/MOCA: Initializing MOCAPlugin I/MOCA: Init MOCA SDK, version x.x.x This shows that the plugin has started, and which is the version ...
    • My Android app does not detect beacons?

      Beacon detection troubleshooting is divided in three steps: SDK configuration, device configuration and MOCA Console configuration.   1. MOCA SDK requires the following configuration checks in the MOCA.properties file: Flag proximityService is ...
    • MOCA SDK Beacon detection engine latency

      The MOCA SDK detection engine differentiates between foreground and background, and works differently in iOS and Android. For Android, in the foreground it scans more aggressively and, using the Balanced profile, detect beacons within 5 seconds ...