react-native-twilio-video-webrtc icon indicating copy to clipboard operation
react-native-twilio-video-webrtc copied to clipboard

AndroidManifest.xml required issue

Open chr4ss12 opened this issue 3 years ago • 1 comments

the section in AndroidManifest.xml does not look right:

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.twiliorn.library">

    <uses-feature android:name="android.hardware.camera"  />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>

    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
</manifest>

namely the uses-feature part for camera and autofocus. This is essentially saying that the library requires camera and autofocus. This will override whatever you set on your projects AndroidManifest.xml.

also the following should be added, as RECORD_AUDIO is declared:

   <uses-feature android:name="android.hardware.microphone" android:required="false" />

In my project AndroidManifest.xml, I've explicitly set required=false, as such:

    <uses-feature android:name="android.hardware.camera" android:required="false" />
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
  

however PlayStore will drop all the support of devices that do not have camera / autofocus. I have manually for now patched the react-native-twilio-video-webrtc AndroidManifest.xml to add required="false", and then it started to work on PlayStore.

This is done correctly on react-native-camera: https://github.com/react-native-camera/react-native-camera/blob/master/android/src/main/AndroidManifest.xml

chr4ss12 avatar Dec 08 '21 21:12 chr4ss12

Looks like a reasonable change, feel free to throw up a PR and I'll make sure to merge it down.

slycoder avatar Feb 13 '22 00:02 slycoder