navigator.camera.getPicture不使用android设备

时间:2015-09-07 04:55:38

标签: cordova sockets phonegap-plugins phonegap-build

navigator.camera.getPicture不使用Android设备

在命令行中出现错误,如此

[phonegap] starting app server...
[phonegap] listening on 192.168.1.45:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /__api__/appzip
[phonegap] 200 /socket.io/socket.io.js
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1441601075309-0
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1441601075345-1&sid=TbhXr9L
76eLIKtCWAAAA
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1441601075367-2&sid=TbhXr9L
76eLIKtCWAAAA
[phonegap] [console.log] Event Called

1 个答案:

答案 0 :(得分:1)

请分享您使用此功能的代码,并在config.xml中添加相同的插件?如果不是插件

<gap:plugin name="org.apache.cordova.camera" />

使用相机的代码是

navigator.camera.getPicture(onSuccess, onFail, { quality: 20,correctOrientation : true,targetWidth: 700,
  targetHeight: 700,
    destinationType: Camera.DestinationType.DATA_URL
 }); 

请结账,你错过了什么吗?