# CREATE REACT-NATIVE MODULE

## 1. Documents
https://reactnative.dev/docs/native-modules-setup

## 2. Create command
```shell
npx create-react-native-library react-native-onmeeting-sdk
```

## 3. Publish module to NPM
```shell
npm login
npm publish
```

## 4. Android
### Requirements
Android 6 (SDK API 23) or higher

### Declare repository with project level
```text
maven { url "https://github.com/namvietsupport/onmeeting-lib/raw/main/releases" }
maven { url 'https://www.jitpack.io' }
```

### Add enableVmCleanup to build.grable project level
Add 
```text
enableVmCleanup: false,
```
To
```text
project.ext.react = []
```
Sample:
```text
project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
    enableVmCleanup: false, //this
]
```
After add this line run cmd to reset cache
npm run start --reset-cache
### Remove android:allowBackup="true" in AndroidManifest.xml