Android Testing
Enable Logging
Branch.enableLogging()
Branch.enableLogging();
Use Test Key
- Use the Branch test key instead of the live key
- Add your test key to the
AndroidManifest.xml
, as described here. - Then, to use your test key, add the following before loading Branch (i.e. before calling
Branch.getAutoInstance()
). Note that if you do not have an Application class and are using BranchApp this method will not work but you can still use the test key by settingtestMode=true
in the manifest.
Branch.enableTestMode()
- Remove before releasing to production
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.
IntegrationValidator.validate(this)
IntegrationValidator.validate(MainActivity.this);
Sample Applications
- Branchsters
- Testbed
- Additional Android SDK Sample Applications
Simulate an Install
To ensure the SDK is setup correctly, you no longer need to simulate an install via the SDK itself. Instead, you can test functionality end to end by completing the following:
Integration Status Tool
Shows the status of your Branch integration. For the best experience, we recommend that you complete all of the steps listed. If a specific platform is not relevant to you, please skip that section.
Updated 3 months ago
Recommended Next Steps