[ionic2.0.0-rc4] camera on Android emulator throws Illegal Argument Exception


#1

Hello!
I wrote simple test:

  Camera.getPicture().then((fileUri) => {
    console.debug(fileUri);
  }, (err) => {
    console.debug(err);
  })

When I try to run it with Android emulator, I got “Illegal argument exception”. I have attached to emulator process and see the following:

12-21 12:33:29.380: W/CordovaPlugin(2214): Attempted to send a second callback for ID: Camera1319094063
12-21 12:33:29.380: W/CordovaPlugin(2214): Result was: “Error”

I am now sure how the ionic Camera retales to Cordova, but the cordova-camera-plugin has the following interface:

camera.getPicture(successCallback, errorCallback, options)

Does it matter?

Any hints are welcome!

Thanks in advance,
AnatolyS


#2

I have fixed the problem. It needs to allocate SD card space to store images in device emulator properties.


#3

I have same issue, how to allocate SD Card space in emulator properties ?
thanks