Skip to content

Commit

Permalink
chore(android): add details about configChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoRoth committed Dec 19, 2024
1 parent c6436a9 commit 8efb7c1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ npm install @eduardoroth/media-player
npx cap sync
```

## Android

For the plugin to work correctly, you have to set/add in your `AndroidManifest.xml` for your main activity the following setting for `android:configChanges`

```xml
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|screenLayout|uiMode|fontScale|density|fontWeightAdjustment"
>
</activity>
```

This will make sure the app doesn't break when doing any of the following actions:

- Changing the orientation
- Showing or hiding the keyboard
- Changing the screen size
- Casting or mirroring the screen
- Changing the font scale
- Changing the screen density

## API

<docgen-index>
Expand Down

0 comments on commit 8efb7c1

Please sign in to comment.