Troubleshooting - Debugging

Forcing invite/survey display

It is possible to force the display of an invite or survey regardless of the current criteria fulfillment:

To display an invite, call ForeSee.showInviteForSurveyID("<YOUR_SURVEY_ID>");

To display a survey, call ForeSee.showSurveyForSurveyID("<YOUR_SURVEY_ID>");

Resetting state

Because the SDK persists state across launches, it may appear to behave inconsistently, but that may just be because it is not currently in an active state. The Trigger module won’t be in an active state if the user has either declined the invite or completed the survey. You can force the Trigger module back to an active state like so:

ForeSee.resetState();

Logging

You can enable logging like so:

ForeSee.setDebugLogEnabled(true);

With debug logging enabled, You can see useful information regarding state and state transitions in the LogCat console. Messages relating to ForeSee code are tagged with the prefix FORESEE_, e.g., FORESEE_TRIGGER, FORESEE_SDK_COMMON.

Pooling Check

As mentioned in the Sampling section, when the SDK is determining whether or not the user is eligible to be invited to a survey, a pooling check is performed by sending an HTTP request to ForeSee servers. If the user is in the sampling pool, then the invitation is presented. While instrumenting the app, it may be desirable to disable the pooling check to ensure that the invitation shows if-and-only-if the Trigger criteria for a measure has been fulfilled. You can do this by calling the following method:

ForeSee.setSkipPoolingCheck(true);

This method should not be included in production code.

Ensuring the correct items in your app are being masked

To make sure you are masking and unmasking the correct sections of your app, please refer to “Debugging Your Masking Setup” in the Masking section

Other articles in this section:

  1. Android N
  2. Debugging (current article)
  3. Disabling the SDK
  4. Common Problems
  5. Dependencies