cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

plugin making app go into landscape mode after taking a picture

Open aquinn637 opened this issue 6 years ago • 4 comments

Bug Report

Problem

After I take a picture my entire app goes into landscape mode temporarily.

What is expected to happen?

Should not switch the rotation of the app.

Information

ionic info [WARN] Bad integration name: gulp

Ionic:

ionic (Ionic CLI) : 4.12.0 (C:\Program Files\nodejs\node_modules\ionic) Ionic Framework : ionic1 1.3.5 @ionic/v1-toolkit : 1.0.22

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected]) Cordova Platforms : android 8.0.0 Cordova Plugins : no whitelisted plugins (15 plugins total)

System:

Android SDK Tools : 26.1.1 (C:\Users\aubrey\Documents\AndroidSDK) NodeJS : v8.16.0 (C:\Program Files\nodejs\node.exe) npm : 6.4.1 OS : Windows 10

cordova requirements

Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-28 Gradle: installed C:\Users\XYZ\Documents\Android\gradle\gradle-5.3.1\bin\gradle

Environment, Platform, Device

Android, have not tried iOS yet. Android 5.

"cordova-android": "^8.0.0"
"cordova-plugin-camera": "^4.0.3"

Checklist

  • [x ] I searched for existing GitHub issues
  • [ x] I updated all Cordova tooling to most recent version
  • [ x] I included all the necessary information above

aquinn637 avatar Jul 11 '19 15:07 aquinn637

Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md

janpio avatar Jul 11 '19 15:07 janpio

@janpio I reproduced the issue. https://github.com/aquinn637/cordova-photo When you come out of the camera feature plugin it rotates the app.

aquinn637 avatar Jul 17 '19 10:07 aquinn637

@aquinn637 Thanks for reporting this.

Unfortunately, this is the case now for iOS 13, I confirm that after going back from the Gallery Camera Roll of Camera, the webview is in landscape orientation. This issue does not apply for previous versions iOS 12.x.

To reproduce: (Test on iOS 13 device)

  1. Initiate Camera or Camera Roll (Gallery)
  2. Select Cancel button or choose a photo/Take photo
  3. The webview now is in landscape orientation.

Sadly, this makes the plugin unusable.

@janpio thanks for your help and support, do you think this could be fixed in the next plugin release.

Thanks a lot

markerio avatar Sep 23 '19 20:09 markerio

Same issue in the latest version .. Do we have any workaround ?

msd117 avatar Nov 10 '23 05:11 msd117