Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Orientation error in barcode scanner

  • i use the barcode plugin of monaca but on android, when show camera scanner, the orientatation is always landscape and i need portrait orientation

    I use this parameters:

          "orientation" : "portrait" // Android only (portrait|landscape), default unset so it rotates with the device

    and in the config.xml this

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

    But not run, any ideas, thanks

  • @ntc Did you use the Monaca version? If so, it can’t be used with Android 6.0 or higher. They recommend you use this plugin:

    It is a very powerful plugin and I have used it successfully. For it, you just use:

    orientation : "portrait"

    The big difference between what you posted and it, is you don’t need the double quotes around orientation. If you are using this plugin, then remove the quotes and let us know.