Prerequisites:
- Create a Redpen Widget for Mobile. Follow the steps of this document if you have not created one already.
- To configure Redpen Android SDK, you will need the widget ID of the mobile widget. Refer to this document to get the Reden widget ID.
To integrate the Redpen Android SDK into your application, configure your android application as below:
Add Dependency
Note: Make sure you have added or used mavencentral in the repositories.
1. Modify your build.gradle. Add the package to the dependencies. The latest version of our SDK can be found on the maven central page of our SDK.
2. Make sure the data binding is enabled.
Initialize the Redpen Capture SDK
Add the following code snippet to the onCreate method of your Application class.
Capture screenshots using custom events
If you want to capture screenshots with custom events (e.g. button click), call the RedpenWidget.captureNow() method as shown in the below example: