How to lock the camera in react native to portrait mode only.

I have a screen where on button,click I open the device camera to click the document picture, Now I want to fix the camera to portrait mode only.

I have tried:

For Android, the AndroidManifest.xml file and the activity element added


to lock to portrait.
Also, tired a third party npm

with this method:


But none of these works for me, currently checking on Android only but I need this for both iOS and Android.