Android Testing

Enable Logging


Test Your Branch Integration

Test your Branch Integration by calling IntegrationValidator.validate in your MainActivity's onStart(). Check your ADB Logcat to make sure all the SDK Integration tests pass. Make sure to comment out or remove IntegrationValidator.validate in your production build.


Sample Testing Apps

Simulate an Install

  • Need to bypass the device's hardware_id

    • Set true in your AndroidManifest.xml

      • Do not use TestMode in production or in the Google Play Store

        <meta-data android:name="io.branch.sdk.TestMode" android:value="true" />


    • add Branch.enableSimulateInstalls(); called before initSession in onStart()

      • Can be used on Live and Test apps
  • Uninstall your app from the device

  • Click on any Branch deep link (will navigate to the fallback URL since the app is not installed)

  • Reinstall your app

  • Read deep link data from Branch.getInstance().initSession() for +is_first_session=true

Device Identifiers not Collected in TEST Mode

When in TEST mode, Branch does not collect the Google Advertising Identifier.

Updated a day ago

Android Testing

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.