Skip to content

Commit 2842bc3

Browse files
authored
Clarify Android auto-init in readme
1 parent c97589b commit 2842bc3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ Platform specific initializers initialize the SDK directly in the target platfor
8383

8484
It is also possible to mix those two strategies based on your needs and project setup.
8585

86+
## Prerequisites (Android-only)
87+
88+
Both of the strategies require disabling auto-init on Android to not clash with the `ContentProvider`, which auto-initializes the Sentry Android SDK. To do so, add the following to the `AndroidManifest.xml` file under your `androidMain` source set:
89+
90+
```xml
91+
<application>
92+
<meta-data android:name="io.sentry.auto-init" android:value="false" />
93+
</application>
94+
```
95+
8696
## Shared Initializer
8797

8898
Create a Kotlin file in your commonMain e.g. `AppSetup.kt` or however you want to call it and create a function that will initialize the SDK.

0 commit comments

Comments
 (0)