An open API service indexing awesome lists of open source software.

https://github.com/yuvraj24/android-instantapp-sample


https://github.com/yuvraj24/android-instantapp-sample

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Android Instant App Sample

## To test your instant app experience on a local machine using Android Studio, complete the following steps:

- If you have an actual native version of your app on your test device, uninstall it.
- Run the **yarn react-native start** command from the instant_app folder in the terminal which will start the metro bundler that connects your device and js code.
- In Android Studio, click on Edit Configurations & from the installation options that appear on the General tab of the Run/Debug Configurations dialog, enable the Deploy as instant app checkbox.
Screenshot 2023-12-04 at 11 35 39 AM




Screenshot 2023-12-04 at 11 29 54 AM



- Select Run > Run in the menu bar, or click Run in the toolbar, then choose the device where you'd like to test your app's instant experiences. Your app's instant experience loads on the test device that you've chosen.

## To test the actual native app experience on your test device, complete the following steps:

- If you have an instant app version of your app on your test device, uninstall it by going to Settings > Manage Apps. Instant apps will not be visible in app menu.
- Run the **yarn react-native start** command from the instant_app folder in the terminal which will start the metro bundler that connects your device and js code.
- In Android Studio, click on Edit Configurations & from the installation options that appear on the General tab of the Run/Debug Configurations dialog, disable the Deploy as instant app checkbox.
Screenshot 2023-12-04 at 11 35 39 AM




Screenshot 2023-12-04 at 11 41 22 AM



- Select Run > Run in the menu bar, or click Run in the toolbar, then choose the device where you'd like to test your actual native app's experiences. Your app's experience loads on the test device that you've chosen.

## Emulator / Physical Device
- Ensure that metro bundler is running and active.
- There is a network_security_config.xml file at below path, where we need to add all the domain ip address for for which access will be allowed.

**Path : instant_app/android/app/src/main/res/xml/network_security_config.xml**
- For Emulator, local IP is already added which will automatically try to sync with metro bundler.
- For Physical device, add your device's IP address to which your deivce is connected to for internet.

## Instant App

- We are using the react-native-modal & react-native-webview npm package to load video KYC agent URL,
https://www.npmjs.com/package/react-native-modal

https://www.npmjs.com/package/react-native-webview

- For the error log of camera not loading refer below screenshot,
Screenshot 2023-12-04 at 12 52 40 PM


- By default, the app is configured to open the WEBRTC video and audio sample URL in Webview which can be changed by add any url in input field.
https://webrtc.github.io/samples/src/content/devices/input-output


Screenshot 2023-12-04 at 12 08 39 PM
    
Screenshot 2023-12-04 at 12 56 39 PM