Force camera to be in portrait mode using cordova / ionic app -


hey hi guys working on hybrid app, invoking camera app want camera in portrait mode only. tried doing changing config file as

<preference name="orientation" value="portrait"/> 

but camera open starts rotation how prevent it

exists plugin force orientation

https://github.com/gbenvenuti/cordova-plugin-screen-orientation

just force portrait before entering camera mode, , disable after exit.

// set either landscape screen.lockorientation('landscape');  // allow user rotate screen.unlockorientation(); 

i dont know if going work, because camera native, if embed camera in app, works sure.

please post results ;)


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -