Skip to content

Commit 244fed6

Browse files
marandanetoHazATbruno-garciaMimiDumpling
authored
introduce androidx support on the android docs (#1805)
* introduce androidx support on the android docs * fix * Update src/collections/_documentation/platforms/android/index.md Co-authored-by: Daniel Griesser <[email protected]> * Update src/collections/_documentation/platforms/android/index.md Co-authored-by: Daniel Griesser <[email protected]> * Update src/collections/_documentation/platforms/android/index.md Co-authored-by: Bruno Garcia <[email protected]> * Update src/collections/_documentation/platforms/android/index.md Co-authored-by: Bruno Garcia <[email protected]> * Update src/collections/_documentation/platforms/android/index.md Co-authored-by: Tien "Mimi" Nguyen <[email protected]> Co-authored-by: Daniel Griesser <[email protected]> Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: Tien "Mimi" Nguyen <[email protected]>
1 parent fff7ecc commit 244fed6

File tree

1 file changed

+15
-0
lines changed
  • src/collections/_documentation/platforms/android

1 file changed

+15
-0
lines changed

src/collections/_documentation/platforms/android/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,21 @@ And, add to `multidex-config.pro` the following lines:
654654

655655
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.
656656

657+
### AndroidX Support
658+
659+
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.
660+
661+
We check at runtime for availability, so if you're not using AndroidX libraries, you can remove them from Sentry's transitive dependencies.
662+
663+
```groovy
664+
implementation ('io.sentry:sentry-android:{version}') {
665+
exclude group: 'androidx.lifecycle', module: 'lifecycle-process'
666+
exclude group: 'androidx.lifecycle', module: 'lifecycle-common-java8'
667+
}
668+
```
669+
670+
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`.
671+
657672
## Integrating the NDK
658673

659674
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.

0 commit comments

Comments
 (0)