Alessandro-PM opened a new issue #701:
URL: https://github.com/apache/cordova-plugin-camera/issues/701
# Bug Report
On Android navigator.camera is undefined
## Problem
calling navigator.camera.getPicture results in a "Cannot read property
'getPicture' of undefined"
### What is expected to happen?
the call should open Camera or folder where images are present
### What does actually happen?
a javascript runtime error is produced: Cannot read property 'getPicture'
of undefined
## Information
I have a cordova app (Phonegap), a file newpost.js included in index.html
file and a button that the user press on the form to add a picture. This app
uses this plugin since I made it (5 years ago), and I think only lately the
problem has occurred.
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
function getPhoto3() {
try
{
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality:
PIC_Q,
destinationType: destinationType.DATA_URL,
targetWidth: PIC_PROF_WIDTH, targetHeight: PIC_PROF_WIDTH,
sourceType: pictureSource.PHOTOLIBRARY,correctOrientation:true });
} catch (e)
{
DoAlert(e.message);
}
}
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
Cordova/Phonegap, on platform Android end on my device Samsung S9, my
android emulator (pixel 2 api 29 android 10 x86)
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
Cordova: cli-9.0.0 (Android 8.0.0)
Plugins:
<plugin
spec="https://github.com/MBuchalik/cordova-build-architecture.git#28e0237" />
<plugin spec="https://github.com/dpa99c/cordova-custom-config.git#fd54ff4" />
<plugin name="cordova-plugin-android-permissions" spec="1.1.2" />
<plugin name="cordova-plugin-app-launcher" spec="0.4.0" />
<plugin
spec="https://github.com/pushandplay/cordova-plugin-apprate.git#a056ac7" />
<plugin
spec="https://github.com/Rareloop/cordova-plugin-app-version.git#68ea434" />
<plugin name="cordova-plugin-calendar" spec="5.1.5" />
<plugin name="cordova-plugin-camera" spec="5.0.1" />
<plugin
spec="https://github.com/hypery2k/cordova-certificate-plugin.git#7621758" />
<plugin
spec="https://github.com/blakgeek/cordova-plugin-cocoapods-support.git#3f1f33d"
/>
<plugin
spec="https://github.com/EddyVerbruggen/Custom-URL-scheme.git#881608e" />
<plugin name="cordova-plugin-device" spec="2.0.3" />
<plugin name="cordova-plugin-dialogs" spec="2.0.2" />
<plugin name="cordova-plugin-email" spec="1.2.7" />
<plugin name="cordova-plugin-facebook4" spec="6.4.0" />
<plugin name="cordova-plugin-geolocation" spec="4.1.0" />
<plugin name="cordova-plugin-globalization" spec="1.11.0" />
<plugin name="cordova-plugin-inappbrowser" spec="4.1.0" />
<plugin
spec="https://github.com/chancezeus/cordova-plugin-jumbomode.git#0648cf1" />
<plugin
spec="https://github.com/twogate/cordova-plugin-sign-in-with-apple#129866e" />
<plugin
spec="https://github.com/prageeth/cordova-plugin-splashscreen.git#31ea5cf" />
<plugin name="cordova-plugin-statusbar" spec="2.4.3" />
<plugin name="cordova-plugin-whitelist" spec="1.3.4" />
<plugin
spec="https://github.com/apache/cordova-plugin-wkwebview-engine#8735c46" />
<plugin name="cordova-plugin-x-socialsharing" spec="5.6.5" />
<plugin
spec="https://github.com/chemerisuk/cordova-support-google-services.git#e4a57d2"
/>
<plugin
spec="https://github.com/xale76/cordova-plugin-intel-xdk-cache.git#ceb626c" />
<plugin
spec="https://github.com/xale76/cordova-plugin-intel-xdk-device.git#9674ae9" />
<plugin name="ionic-plugin-keyboard" spec="2.2.1" />
<plugin spec="https://github.com/jwall149/cordova-multidex.git#d2358b5" />
<plugin
spec="https://github.com/xale76/phonegap-plugin-barcodescanner.git#f88c84a" />
<plugin name="pushwoosh-cordova-plugin" spec="7.18.11" />
Build by Phonegap site
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]