Skip to content

introduce androidx support on the android docs #1805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/collections/_documentation/platforms/android/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,21 @@ And, add to `multidex-config.pro` the following lines:

If you experience issues like `Could not find class` on devices running the `Dalvik VM`, you may expand the above rules to keep the necessary classes in the main dex file.

### AndroidX Support

Sentry uses the AndroidX libraries for detecting when the Application is either in the background or in the foreground. This is necessary for having an accurate result across all the Android OS versions.

We check at runtime for availability, so if you're not using AndroidX libraries, you can remove them from Sentry's transitive dependencies.

```groovy
implementation ('io.sentry:sentry-android:{version}') {
exclude group: 'androidx.lifecycle', module: 'lifecycle-process'
exclude group: 'androidx.lifecycle', module: 'lifecycle-common-java8'
}
```

Be aware that by removing those transitive dependencies, the automatic session tracking won't work, but you can still do it manually by calling the public APIs `startSession` and `endSession`.

## Integrating the NDK

To use the Android NDK in your native code, include the Sentry NDK libraries into your project so that the compiler can link the libraries during the build.
Expand Down