# Using a WebView

{% hint style="success" %}
Before starting, you will need to add the corresponding permissions to be able to access both the camera and microphone, as described in the [Android](/whereby-for-mobile-development/whereby-for-android/in-android-apps.md) and [iOS](/whereby-for-mobile-development/whereby-for-ios/in-ios-apps.md) sections.
{% endhint %}

Follow this [guide](https://github.com/react-native-webview/react-native-webview/blob/master/docs/Getting-Started.md#react-native-webview-getting-started-guide) to add and setup the `react-native-webview` library in your React Native project.

Finally, add the WebView component to your code, setup the properties, and fill the room URL and parameters.

{% hint style="warning" %}
It's been reported that the Whereby camera and microphone modals that appear on hover don't always properly close while running in the Android Simulator. If you experience this issue, try running your application on a physical device.
{% endhint %}

Here is a short example:

{% tabs %}
{% tab title="React native" %}

```jsx
import React, { Component } from 'react';
import { WebView } from 'react-native-webview';

const roomUrl = ''; // Replace by your own
const roomParameters = '?needancestor&skipMediaPermissionPrompt';

export default class App extends Component {
  render() {
    return (
      <WebView
        startInLoadingState
        source={{ uri: roomUrl + roomParameters }}
        // If using html as source, you need to include baseUrl: "https://whereby.com" as a secondary prop
        mediaPlaybackRequiresUserAction={false}
        mediaCapturePermissionGrantType={'grant'}

        // iOS specific:
        allowsInlineMediaPlayback

        // Android specific:
        javaScriptEnabled
        domStorageEnabled
      />
    );
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.whereby.com/whereby-for-mobile-development/in-react-native/in-react-native.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
