react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
AndroidManifest.xml required issue
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
Looks like a reasonable change, feel free to throw up a PR and I'll make sure to merge it down.