Phonegap(3.0.0) Camera not successful on first try

前端 未结 6 2151
温柔的废话
温柔的废话 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条回答
  •  滥情空心
    2021-02-15 17:48

    I had the same problem after updating from 3.0.0 to 3.1.0. Delayed camera, no geolocation, etc.

    Look if the file platforms\android\cordova\version states an old version. Then you need to update your platform. So here is what i did.

    • Remove all plugins: cordova plugin rm org.apache.cordova.camera
    • Remove the platform: cordova platform remove android (will delete changes you have made to *.java files)
    • Add the platform: cordova platform add android
    • Add all plugins: cordova plugin add org.apache.cordova.camera
    • Check permissions
    • Build it

    It's basically like creating a new project.

提交回复
热议问题