I am trying to load a webpage (that must access the camera) on WebView using react native .But i can't access the camera through webview in react native android app.
It is possible to use the Camera from within a WebView on iOS,
just Use
<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} PhotoLibrary Usage</string>
steps are given below in images:
Open info.plist with Source Code
Paste the above code here
Looks like it is possible to use getUserMedia from within a WebView on Android, but not iOS - can-i-use-navigator-mediadevices-getusermedia-in-android-ios-webview
Check this out for a way to do it in iOS (but it looks like it will require a custom iOS module) - access-camera-from-uiwebview
Related
how to implement screen share in agora video call in react native?
in agora documentation provide code but that not an react code example link. so how inegrated in react native.
please provide example
The React Native SDK now supports screen-sharing. You can use the startScreenCapture method to share you screen.
Old Answer:
Agora React Native SDK does not support screen sharing out of the box, however you can setup screen sharing by using the underlying Android and iOS SDKs. You can use the Android example that you referenced in your example link and write a bridge to invoke the java method from React-Native.
I'm running a website inside of a react-native-webview with some additional Javascript for iOS and Android in React Native (expo). This way we have an app, without having to create another codebase.
The problem is there are anchors with mailto in the href, these break the app on both platforms and return a -1002 error on iOS and -10 error on Android.
Is it possible to work something into the Webview to open the default mail app?
If you create a React Native <Button>, it renders as a UIButton in iOS and an android.widget.Button in android. This means that it looks different on different platforms.
What about Pressables? What is the simplest way to create an iOS button on iOS and an Android button on Android without resorting to a 3rd partly npm library?
I have created an app using react native expo cli. The app is basically loading a website using webview. There is abutton to capture image. How to give permissions
I am storing my videos in Firebase Storage. I want to give an option to play the videos i am retrieving from Firebase in a Third-Party player.
If you are using Expo, yes there is:
Expo is a free and open source toolchain built around React Native to help you build native iOS and Android projects using JavaScript and React - Expo Website
The Expo SDK, which include components and many more cool stuff, come built-in with create-react-native-app has the Video Component
It is a component that displays a video inline with the other React Native UI elements in your app. The display dimensions and position of the video on screen can be set using usual React Native styling.
You can use that to play the videos hosted on firebase