Highlighted

CameraRoll crash silently after calling facebook-ANE (Android)

New Here ,
Feb 01, 2016

Copy link to clipboard

Copied

Hi,
I'm using AIR 19 (and tested with 20) with facebook ANE (free version to download).
When I launch firstly the ANE to login or share content to Facebook, everything works correcly, but after this if I launch CameraRoll.browseForImage(), the CameraRoll class stop responding (crash silently and return to the app to continue working. No error, select or cancel event dispatched).

If I launch CameraRoll one more time I have an error message, because one instance of CameraRoll continue open.
If I launch the CameraRoll befor login with ANE, everything works correctly.

This problem occurs on Android, but not on IOS!

The team who builded the ANE, have no idea about this problem because they doesn't know if CameraRoll on Android use/dispatch/listen to specific event or something other.

import flash.media.CameraRoll;

FB.getInstance(FB_APP_ID_NUMBER);
FB.logManager.addEventListener(FBEvent.LOGIN_DONE, fbGetPermissionPublishSuccess);
FB.logManager.addEventListener(FBEvent.LOGIN_CANCELED, fbGetPermissionCanceled);
FB.logManager.addEventListener(FBEvent.LOGIN_ERROR, fbGetPermissionError);
FB.logManager.requestPermission(LogManager.WITH_PUBLISH_PERMISSIONS, Permissions.publish_actions);

private function fbGetPermissionPublishSuccess(event:FBEvent):void {
if (CameraRoll.supportsBrowseForImage) {
  camera = new CameraRoll();
  camera.addEventListener(MediaEvent.SELECT, mediaEventComplete);
  camera.addEventListener(Event.CANCEL, browseCancelled);
  camera.addEventListener(ErrorEvent.ERROR, mediaErrorHandler);
  // Open up the camera roll
  camera.browseForImage();
  }
}

Any idea about this?
Thanks in advance.

TOPICS
Performance issues

Views

271

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CameraRoll crash silently after calling facebook-ANE (Android)

New Here ,
Feb 01, 2016

Copy link to clipboard

Copied

Hi,
I'm using AIR 19 (and tested with 20) with facebook ANE (free version to download).
When I launch firstly the ANE to login or share content to Facebook, everything works correcly, but after this if I launch CameraRoll.browseForImage(), the CameraRoll class stop responding (crash silently and return to the app to continue working. No error, select or cancel event dispatched).

If I launch CameraRoll one more time I have an error message, because one instance of CameraRoll continue open.
If I launch the CameraRoll befor login with ANE, everything works correctly.

This problem occurs on Android, but not on IOS!

The team who builded the ANE, have no idea about this problem because they doesn't know if CameraRoll on Android use/dispatch/listen to specific event or something other.

import flash.media.CameraRoll;

FB.getInstance(FB_APP_ID_NUMBER);
FB.logManager.addEventListener(FBEvent.LOGIN_DONE, fbGetPermissionPublishSuccess);
FB.logManager.addEventListener(FBEvent.LOGIN_CANCELED, fbGetPermissionCanceled);
FB.logManager.addEventListener(FBEvent.LOGIN_ERROR, fbGetPermissionError);
FB.logManager.requestPermission(LogManager.WITH_PUBLISH_PERMISSIONS, Permissions.publish_actions);

private function fbGetPermissionPublishSuccess(event:FBEvent):void {
if (CameraRoll.supportsBrowseForImage) {
  camera = new CameraRoll();
  camera.addEventListener(MediaEvent.SELECT, mediaEventComplete);
  camera.addEventListener(Event.CANCEL, browseCancelled);
  camera.addEventListener(ErrorEvent.ERROR, mediaErrorHandler);
  // Open up the camera roll
  camera.browseForImage();
  }
}

Any idea about this?
Thanks in advance.

TOPICS
Performance issues

Views

272

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 01, 2016 0

Have something to add?

Join the conversation