https://github.com/ganny26/react-native-android
Integrating react native to existing android application
https://github.com/ganny26/react-native-android
android react-native
Last synced: 2 months ago
JSON representation
Integrating react native to existing android application
- Host: GitHub
- URL: https://github.com/ganny26/react-native-android
- Owner: ganny26
- Created: 2019-03-13T10:18:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T17:45:32.000Z (over 3 years ago)
- Last Synced: 2025-04-22T18:59:59.632Z (about 1 year ago)
- Topics: android, react-native
- Language: Java
- Size: 966 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## React Native Android Setup on Existing App
This app demonstrates how to integrate a single activity with react native view
### How to start
* Open `rnapp/index.js`
* Do required changes in `index.js` file
### How to debug
* Connect physical device and do `yarn start` from rnapp folder
* To debug go to url `http://localhost:8081/debugger-ui/`
* To view metro bundled js file `http://localhost:8081/index.delta?platform=android&dev=true`
* Inorder to reload js files on your activity
type `adb shell input keyevent 82` it will enable debug menu to reload
* If you are on emulator press `Command ⌘ + M`
# Codepush Setup
1. Generate JSK file
```bash
keytool -genkey -alias -keypass -keyalg RSA -keystore codepushandroid.jks
```
2. Login to appcenter cli
```bash
npm install -g appcenter-cli
appcenter login
appcenter apps list
appcenter apps set-current
```
3. Create token
```bash
appcenter codepush deployment add -a Staging
appcenter codepush deployment list --displayKeys
```
4. To upload `index.js` bundle
```bash
code-push release-react android
(or)
appcenter codepush release-react -a -d Staging
```
### How to release
* `yarn build` will generate bundle on `src/main/assets/index.android.bundle`
* Then build signed APK
## Release OTA using Azure
https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli
### Further references
1. https://facebook.github.io/react-native/docs/integration-with-existing-apps
2. https://medium.com/mindorks/react-native-integration-with-existing-app-f2757c2e672d
3. https://codeburst.io/integrating-react-native-into-an-existing-app-android-c27bb1b81574