Reading MOCA SDK Logs

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 of the MOCA SDK. Below these lines you will typically find:

W/MOCA: Service geo-tracking was not permitted by the user. Service is disabled now.
W/MOCA: Service proximity was not permitted by the user. Service is disabled now.
I/MOCA: Event Tracking : [RUNNING]
I/MOCA: Remote Push : [RUNNING]
I/MOCA: Geo Tracking : [STOPPED]
I/MOCA: Proximity : [STOPPED]
W/MOCA: Indoor location not available
I/MOCA: Indoor Analytics: [UNAVAILABLE]
I/MOCA: Recommendations : [STOPPED]

These modules are dependant on permissions and/or configuration. You can see if the permissions are granted/denied, the service is running/stopped or if you don't have an expected module (not available). This instance shows us that Geo Tracking and Proximity are both stopped, caused by a permission that was denied (Location permission).

 

Not all notifications are critical, but Errors are to be checked in depth as they impact directly on the stability and usability of the SDK:

ID

Meaning
I/       Info
W/Warning
E/Error
D/Debug 

Warnings are good indicators of what can trigger an unexpected behavior, but should not impact on the stability and usability of the SDK.

    • Related Articles

    • MOCA iOS SDK LOG_LEVEL Settings

      You can set a variety of logging levels for our SDK in the MOCAconfig.plist file, under the LOG_LEVEL variable:   LOG_LEVEL Description Off Log is turned off at SDK level. Error Shows only error events. Warning Shows only warning events. Info Shows ...
    • iOS 13 and MOCA SDK

      MOCA iOS SDK has been tested on BETA versions of iOS 13. Find the version notes below: - MOCA SDK for iOS uses the CoreBluetooth framework in order to monitor bluetooth status. In iOS 13 the mere fact of using any of the CoreBluetooth methods will ...
    • 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 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:   Permission Explanation android.permission.INTERNET Allows MOCA SDK to open network sockets so it has ...
    • 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: ...