yarn add react-native-webview
npm install --save react-native-webview
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<key>NSCameraUsageDescription</key>
<string>Camera Permission</string>
<key>NSMotionUsageDescription</key>
<string>Motion Permission</string>
import React, { useEffect } from "react";
import {
SafeAreaView,
StyleSheet,
PermissionsAndroid,
Platform,
} from "react-native";
import { WebView } from "react-native-webview";
function App(): React.JSX.Element {
return (
<SafeAreaView style={styles.container}>
<WebView
style={styles.container}
mediaPlaybackRequiresUserAction={false}
allowsFullscreenVideo
allowsInlineMediaPlayback
source={{
uri: "https://cadastro.io/:token",
}}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default App;