私たちのプロジェクトでは、Cordovaのカメラプラグインを使用しています。 iFix - 7.1.0.0-MFPF-IF201703011645を適用する前にうまくいきました。MFP iFIX - 7.1.0.0-MFPF-IF201703011645の後にアンドロイドでnavigator.camera.getPictureが動作しない
カメラのコードスニペットを確認してください。
$scope.cameraOptions = {
quality: 50,
destinationType: Camera.DestinationType.DATA_URL,
sourceType : Camera.PictureSourceType.CAMERA
};
navigator.camera.getPicture(success , failure , $scope.cameraOptions);
Androidのエラーログ:
03-21 20:36:41.990: E/PluginManager(29129): Uncaught exception from plugin
03-21 20:36:41.990: E/PluginManager(29129): java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
03-21 20:36:41.990: E/PluginManager(29129): at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:560)
03-21 20:36:41.990: E/PluginManager(29129): at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:534)
03-21 20:36:41.990: E/PluginManager(29129): at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:376)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.camera.CameraLauncher.takePicture(CameraLauncher.java:278)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.camera.CameraLauncher.callTakePicture(CameraLauncher.java:258)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.camera.CameraLauncher.execute(CameraLauncher.java:167)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:86)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.PluginManager.exec(PluginManager.java:153)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:61)
03-21 20:36:41.990: E/PluginManager(29129): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:40)
03-21 20:36:41.990: E/PluginManager(29129): at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
03-21 20:36:41.990: E/PluginManager(29129): at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41)
03-21 20:36:41.990: E/PluginManager(29129): at android.os.Handler.dispatchMessage(Handler.java:102)
03-21 20:36:41.990: E/PluginManager(29129): at android.os.Looper.loop(Looper.java:135)
03-21 20:36:41.990: E/PluginManager(29129): at android.os.HandlerThread.run(HandlerThread.java:61)
03-21 20:36:41.997: I/chromium(29129): [INFO:CONSOLE(204)] "Failed because: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference", source:
注 - 実行しないとそれ! – halfer