Phonegap(3.0.0) Camera not successful on first try

前端 未结 6 2152
温柔的废话
温柔的废话 2021-02-15 17:21

For testing purposes I copied the full example found on the phonegap camera API and I put an alert on onPhotoDataSuccess to test when the function is fired. On the

6条回答
  •  闹比i
    闹比i (楼主)
    2021-02-15 17:53

    I had this exact problem on Cordova 3.4.0, with a fresh Cordova install (no upgrade from previous version as some others posted). Taking the first picture would do nothing- no success callback, no fail callback. Taking the second picture would result in a success callback but the DATA_URL data (the base64 encoded image) that came back was the data from the FIRST picture.

    For me it was working fine on one phone, various emulators, etc. except on one Android 4.2 phone where it did this. The solution was to uninstall the app from the phone using the phone's application management under settings, then reinstall the app- then the first picture would trigger the success callback with its own data.

    No idea why, but uninstalling and reinstalling the app resolved it for me.

提交回复
热议问题