Skip to content

Integration

Requirements

  • Android SDK: API 21

Gradle

AppeliumFeedback SDK can be found in the Appelium Maven repository. Add this line to your build.gradle file to access the Maven repository:

1
2
3
4
5
repositories {
    maven {
        url 'https://maven.appelium.com/release'
    }
}

To use the AppeliumFeedback SDK, add this line to your build.gradle file:

implementation ('com.appelium:feedback:5.1.0:release@aar') {
    transitive = true
}

Basic usage

To start the bug reporting interface for shake invocation events, add this line to your onCreate method in the Application class of your Android app:

AppeliumFeedback.start(apiKey =  <#api key#>, application = this)

Enabling features

In the code above, we explained how simple it is to bootstrap bug reporting feature.

We believe that SDKs should be transparent and explicit about which features get enabled and when. For this reason we are making all the features off by default. Instead of going through documentation in order to find out how to disable something (which you never thought would be enabled in the first place), you can rest assured that with Appelium it is disabled unless you have explicitly enabled it 👍.

Nevertheless, lets examine other useful features that you can enable and how to pass more configuration parameters:

AppeliumFeedback.start(
    apiKey = <#api key#>,
    application = this,
    bugReporting = BugReportingConfiguration.Enabled(),
    crashReporting = CrashReportingConfiguration.Enabled(),
    errorReporting = ErrorReportingConfiguration.Enabled(),
    networkMonitoring = NetworkMonitoringConfiguration.Enabled(),
    sessionMonitoring = SessionMonitoringConfiguration.Enabled(),
    performanceTraces = PerformanceTracesConfiguration.Enabled()
)

Some features, like bug reporting allow more granular controls, e.g:

AppeliumFeedback.start(
    apiKey = <#api key#>,
    application = this,
    bugReporting = BugReportingConfiguration.Enabled(
        screenshotsEnabled = true,
        screenRecording = BugReportingConfiguration.ScreenRecordingConfiguration.Enabled(
            renderTouchEvents = true
        ),
        invocationEvents = setOf(
            InvocationEvent.Shake(),
            InvocationEvent.Screenshot()
        )
    )
)

The default logs retention is 1 minute, and can be further customized via the logsRetention parameter during initialization:

AppeliumFeedback.start(
    apiKey = <#api key#>,
    application = this,
    logsRetention = LogsRetentionConfiguration(maxLifetimeMs = 120_000, maxCount = 1_000)
)

Additionally, you can set the name and/or the version of the backend environment. This is very useful for network monitoring as it will allow you to compare network performance across different environments and different versions.

AppeliumFeedback.setApplicationEnvironment(name = "STAGING", version = "2.4.0")

Required permissions

  • android.permission.INTERNET
  • android.permission.READ_EXTERNAL_STORAGE
  • android.permission.WRITE_EXTERNAL_STORAGE
  • android.permission.READ_BASIC_PHONE_STATE

Next steps

Once you integrated the SDK, you can add enrich the bug reports with Console Logs and Network Logs.


You can obtain the api key in Dashboard under application specific settings.