GithubHelp home page GithubHelp logo

freshplanet / ane-imagepicker Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 48.0 46.36 MB

Air Native Extension for mobile camera and gallery features (iOS + Android)

License: Apache License 2.0

ActionScript 9.23% Java 41.86% Objective-C 35.53% C 13.22% Ruby 0.17%

ane-imagepicker's People

Contributors

adamfp avatar ataugeron avatar dmytrooverchenko avatar mateo-kozomara avatar pnico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ane-imagepicker's Issues

ios8

Hi,
Thank you for your ANE this is work perfectly on ios7. But, displayCamera function unfortunately don't work on ios 8. Seems UI screen but didnt get camera display Is there a problem?

if (AirImagePicker.getInstance().isCameraAvailable() )
{
AirImagePicker.getInstance().displayCamera(onImagePicked);
}

Thank you!

Android Kit Kat

Useful ANE! By the way i'm start using this ANE because there is some issue with the default CameraUI on Android device.
Same here :(
I'm using nexus 5 4.4.2. when i try to displayCamera to take a picture, it's never came back to the application when i press the ok button.
If i press the x it's properly fire the event that user cancel the process.
I also try to add the the activities in the manifest file without success...
Have you any idea how to solve it?

Image size/resolution

Hi,

when picking an image from the gallery with "displayImagePicker()" on Android device it seems like neither the BitmapData nor the ByteArray passed back to the callback function is the original image, but a smaller version of the original image picked. Is it also possible to get the file-reference of the image picked from the device? Or have i missed something?

Best,
Chris

How to get video file size

Thanks for this great plugin.
I am working on an app that allows the user to upload video from his camera.
I want to limit the size of the file allowed for upload.
Can you please tell me how do I get the size of the 3gp file after capture?

Thanks

Cannot get image from Camera

It seems that everything that is returned when shooting the image by camera is the path to temporary image file which does not already exists at the moment it is accessed in actionscript 3 code. This is true for android only. This is valid for feature/more-compression branch

NativeCamera and AirImagePicker

My app has a screen to use videochat (use Camera.getCamera()->NetStream...) to stream camera content to the partner side.VideoChatScreen
The app also have a screen, where a user can take picture.TakePictureScreen

If I use the TakePictureScreen to take picture before initialize the VideoChatScreen everything is works fine. But If I initialize the VideoChatScreen and switch back to the TakePictureScreen when the picture is taken, and select "use image" the application is overlayed by a black screen.

This is only happen just Android. on iOS is working.

If I dont call the NativeCamera (Camera.getCamera()), the AirImagePicker is working allways.

what is the problem, and how can I solve this.

thanks

ios7, ios8 status bar solution

To avoid status bar disappearing after opening camera roll, you can add this to AirImagePicker.m:

-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}

-(BOOL)prefersStatusBarHidden // iOS8 definitely needs this one. checked.
{
return YES;
}

-(UIViewController *)childViewControllerForStatusBarHidden
{
return nil;
}

And also in method displayImagePickerWithSourceType change self.imagePicker.delegate = self; to self.imagePicker.delegate = (id)self;

It also avoid the loss context in Starling.

StatusBar on ios7

After come from gallery to app, statusbar appear and stays on top of the application.

Not working on iOS7 [With solution]

Hi, I noticed a bug with the new iOS7. If you try to show up the pickers then nothing happens. Add this lines to fix it in the AirImagePicker.m:

if (rootViewController == nil) {
        NSArray *windows = [UIApplication sharedApplication].windows;
        for (int i=0; i<windows.count; i++) {
            if ([[windows objectAtIndex:i] isKindOfClass:[UIWindow class]]) {
                rootViewController = ((UIWindow *)[windows objectAtIndex:i]).rootViewController;
                break;
            }
        }
    }

Before this line:

if (sourceType == UIImagePickerControllerSourceTypeCamera || UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

After that, we need to recompile the ANE. Thanks.

Edited video files causes crash

I love this component, and the reason we use it was to access video files in the gallery in iOS.
But I noticed that the app crashes when the video file has been edited (cropped) inside the gallery (iOS7 functionality I think). Non-edited videofiles still works fine but the edited one crashes after a couple of seconds after the compressing of the file starts (when choosing the video clip).
It might be something related to iOS8 since I haven't seen it before. Anyone knows anything about it?

Does this extension work for Android

it can not work for Android,but work for IOS.
I trace AirImagePicker.getInstance().isImagePickerAvailable()=true and AirImagePicker.getInstance().isCameraAvailable()=true.

but used when there is no response.

AIR3.7,Galaxy Nexus,Android4.2.2.

i am Chinese,my English is poor,srooy.

can you help me? thank you!

a bug, main activity death when crop image in android

thanks for your great job first !!

the ANE works fine in iOS, but in android, it sometimes causes the main activity death when picking image with cropping,
so I modified some code in class AirImagePickerExtensionContext, and then it works fine, I hope they could give some help.

I copied some code from here:
http://www.open-open.com/lib/view/open1352201409844.html

and here is the code diff for AirImagePickerExtensionContext :

@@ -201,6 +202,7 @@ public class AirImagePickerExtensionContext extends FREContext
if (_pickerActivity != null)
{
_pickerActivity.finish();

  •       _pickerActivity = null;
    }
    
    String event = success ? "DID_FINISH_PICKING" : "DID_CANCEL";
    

    @@ -232,8 +234,8 @@ public class AirImagePickerExtensionContext extends FREContext
    switch (action)
    {
    case GALLERY_ACTION:

  •           intent = new Intent(Intent.ACTION_GET_CONTENT);
    
  •           intent.setType("image/*");
    
  •           intent = new Intent(Intent.ACTION_PICK, null);
    
  •           intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
            return Intent.createChooser(intent, "Choose Picture");
    
        case CAMERA_ACTION:
    

    @@ -282,6 +284,7 @@ public class AirImagePickerExtensionContext extends FREContext
    //-----------------------------------------------------//

    PickerActivity _pickerActivity;

  • private Uri _cropInputUri;

private void startPickerActivityForAction(int action)
{
@@ -333,7 +336,8 @@ public class AirImagePickerExtensionContext extends FREContext

 if (_shouldCrop)
 {
  •       _cropInputPath = getPathForProcessedPickedImage(imagePath);
    
  •       _cropInputPath = null;//getPathForProcessedPickedImage(imagePath);
    
  •       _cropInputUri = imageUri;
        startPickerActivityForAction(CROP_ACTION);
     }
     else
    

    @@ -380,41 +384,55 @@ public class AirImagePickerExtensionContext extends FREContext

    private Boolean _shouldCrop = false;
    private String _cropInputPath;

  • private String _cropOutputPath;
    +// private String _cropOutputPath;

private void prepareIntentForCrop(Intent intent)
{
// Set crop input

  •   intent.setDataAndType(Uri.fromFile(new File(_cropInputPath)), "image/*");
    
  •   if(_cropInputPath != null)
    
  •   {
    
  •       intent.setDataAndType(Uri.fromFile(new File(_cropInputPath)), "image/*");
    
  •   } else {
    
  •       intent.setDataAndType(_cropInputUri, "image/*");
    
  •   }
    
  •   // Set crop output
    
  •   File tempFile = getTemporaryImageFile();
    
  •   _cropOutputPath = tempFile.getAbsolutePath();
    
  •   intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));
    

    +// // Set crop output
    +// File tempFile = getTemporaryImageFile();
    +// _cropOutputPath = tempFile.getAbsolutePath();
    +// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));

    // Cropped image should be square (aspect ratio 1:1)
    intent.putExtra("aspectX", 1);
     intent.putExtra("aspectY", 1);
     intent.putExtra("scale", true);
    
  •    // Set crop output size
    
  •   BitmapFactory.Options options = new BitmapFactory.Options();
    
  •   options.inJustDecodeBounds = true;
    
  •   BitmapFactory.decodeFile(_cropInputPath, options);
    
  •   int smallestEdge = Math.min(options.outWidth, options.outHeight);
    
  •   intent.putExtra("outputX", smallestEdge);
    
  •   intent.putExtra("outputY", smallestEdge);
    

    +// // Set crop output size
    +// BitmapFactory.Options options = new BitmapFactory.Options();
    +// options.inJustDecodeBounds = true;
    +// BitmapFactory.decodeFile(_cropInputPath, options);
    +// int smallestEdge = Math.min(options.outWidth, options.outHeight);
    +// intent.putExtra("outputX", smallestEdge);
    +// intent.putExtra("outputY", smallestEdge);

  •    intent.putExtra("outputX", 100);
    
  •    intent.putExtra("outputY", 100);
    
  •    intent.putExtra("return-data", true);
    

    }

    private void handleResultForCrop(Intent data)
    {
    AirImagePickerExtension.log("Handle result for crop: " + data);

- _pickedImage = BitmapFactory.decodeFile(_cropOutputPath);

  •    deleteTemporaryImageFile(_cropInputPath);
    
  •    deleteTemporaryImageFile(_cropOutputPath);
    

    +// _pickedImage = BitmapFactory.decodeFile(_cropOutputPath);
    +//
    +// deleteTemporaryImageFile(_cropInputPath);
    +// deleteTemporaryImageFile(_cropOutputPath);

  •   Bundle extras = data.getExtras();
    
  •   if (extras != null) {
    
  •       _pickedImage = extras.getParcelable("data");
    
  •       _pickedImageJPEGRepresentation = getJPEGRepresentationFromBitmap(_pickedImage);
    
  •   }
     dispatchResultEvent(true);
    

    }

apologize for my poor english : )

Exception when pressing backbutton or cancel

I know that this ANE is not maintained anyway, but just for the record:

When pressing the backbutton or cancel while browsing the gallery there is a exception:

ArgumentError: Error #1063: Argument count mismatch on Function/CameraRollManager.as$0:anonymous(). Expected 3, got 1.
at com.freshplanet.ane.AirImagePicker::AirImagePicker/onStatus()[/Users/joseph.saade/Desktop/Accounts/Native Extensions/ANE-ImagePicker-Modified/actionscript/src/com/freshplanet/ane/AirImagePicker/AirImagePicker.as:358]

Ok. Resolved myself. with rest parameters.

Android - app crash after selecting image from galery

Hi,

i have opend new as3 mobile project.
and put this simple code.
I am using S3, itwsopen the galley for selecting image, after i select an image, the app crash.

plz help
thanks

public class test extends Sprite
{
private var button:Sprite;
public function test()
{
super();

        // support autoOrients
        stage.align = StageAlign.TOP_LEFT;
        stage.scaleMode = StageScaleMode.NO_SCALE;
        button= new Sprite();
        // the we draw a green rectangle inside of it
        button.graphics.beginFill(0x00FF00, 1);
        button.graphics.drawRect(100, 100, 100, 200);
        button.graphics.endFill();
        button.addEventListener(MouseEvent.CLICK,doit);
        // then we add the button to stage
        this.addChild(button);

    }

    protected function doit(event:Event):void
    {
        AirAlert.getInstance().showAlert("Sdsd","sdsd");
        if (AirImagePicker.getInstance().isImagePickerAvailable())
        {
            AirImagePicker.getInstance().displayImagePicker(function(image:BitmapData, data:ByteArray):void {
                // Do something with the BitmapData or the JPEG-encoded ByteArray
            });
        }
    }

Cancelling image picker results in (almost) black screen

I'm trying the ANE on a Nexus 5 and when I press Back in the Image Picker, the app goes black. Well, almost all black, except for this tiny square of light pixels in the top-left corner of the screen. The app doesn't re-activate.

If I press Back again, the app activates and behaves normally again.

Am I doing something wrong or is this expected behaviour or is this a bug?

Cheers! :)

How to play video, saved with this extension

On callback function we receive url to saved video file, after it we tray to play video with folowing code:
mNetConnection = new NetConnection ();
mNetConnection.connect (null);
mNetStream = new NetStream (mNetConnection);
mNetStream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus, false, 0, true);
var customClient:Object = new Object();
mNetStream.client = customClient;
mVideo = new Video (rect.width, rect.height);
mVideo.smoothing = true;
mVideo.attachNetStream(mNetStream);
addChild(mVideo);
mVideo.x = rect.x + 300;
mVideo.y = rect.y + 250;
mVideo.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
if (mNetStream) mNetStream.play("file://"+url);
On netStatus got next trace:
event.info.code = NetStream.Play.Start
event.info.code = NetStream.Play.Failed
event.info.code = NetStream.Play.Stop
Can you help, please? What we do wrong?

Silently crashes when launching app (iOS)

Strange problem I noticed which I'm not really sure what does it have to do with.

I'm using AirImagePicker.getInstance().displayImagePicker and it works fine if I call it directly on mouse click event, but if I call it with a 500ms delay after the mouse click (with setTimeout, to show a spinner before the operation), the app crashes silently right after launching it, I believe during the import/init of the AirImagePicker ANE.

However, if I compile the app with -useLegacyAOT=yes parameter, it doesn't seem to crash. Also, if I debug the app on the device it works fine. I'm using the latest AIR 15 build 258.

AirImagePicker and AirDatePicker

The time when they are used together, Air DatePicker invalid.

            <application>
                <activity android:name="com.freshplanet.datePicker.DatePickerActivity" android:theme="@android:style/Theme.Holo.Dialog"/>
            </application>

Image picker doesn't show up

I am trying to display the image picker in an empty project. Here is the code I'm using:

public class testANE extends Sprite
{
    public function testANE()
    {
        super();


        this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    }

    protected function onAddedToStage(event:Event):void
    {
        if (AirImagePicker.getInstance().isImagePickerAvailable())
        {
            trace("is available");
            AirImagePicker.getInstance().displayImagePicker(function(image:BitmapData, data:ByteArray):void {
                // Do something with the BitmapData or the JPEG-encoded ByteArray
            });
        }
    }
}

'is available' gets print but the image picker is not displayed. Any reason why?

If you don't specify an Album, the ANE creates an image of 1px x 1px

This works:

camera.displayCamera(onDisplayCameraFinished, 1000, 1000, false, false, "Album");

This doesn't (it creates a 1px x 1px image):
camera.displayCamera(onDisplayCameraFinished, 1000, 1000);

Peaking your AirImage.as I see that you are not setting the maxImageWidth and maxImageHeight, if there is no AlbumName provided, which can be the cause for this glitch.

I do not wish to save captured images locally, or at least not at all in the user's cameraRoll.

Can you correct it? :) Thanks!

        if(_isAndroid) {
            if (albumName != null) _context.call("displayCamera", maxImageWidth, maxImageHeight, allowVideo, crop, albumName, chatLink);
            else _context.call("displayCamera", allowVideo, crop);
        } else {
            if (albumName != null) _context.call("displayCamera", maxImageWidth, maxImageHeight, allowVideo, crop, albumName);
            else _context.call("displayCamera", allowVideo, crop);
        }

Error occurred while packaging the application

When I try to run the test application, I get:-

Error occurred while packaging the application:

An implementation for native extension 'com.freshplanet.AirImagePicker' required by the application was not found for the target platform.

I did this by:-

  1. creating a new Flex mobile project
  2. point project to the test source code
  3. Use AIR 3.8 with Flex 4.10
  4. Set Flex build path Native Extensions to libs/AirImagePicker.ane
  5. Adjust the ?-app.xml file
  6. Set the debug config to:-
    a. use my ID
    b. use my certificate and provisioning file
  7. Run

Is there something missing from the repository to help to get this going?

This my first attempt at using an ANE, let alone create one.

Compiling error

Hi, I'm attempting to recompile, but it fails when building the android files. Here's the error:

{local folder path}/bin/build.xml:69: {local folder path}/android/res does not exist.

I already edited the build.config file. The iOS part builds successfully. I don't know what to do with the android error above.

Image Picker does not return the full size image

Again, testing the ANE on my Nexus 5 and wondering how come does the Image Picker not return full size images?

When picking an image 1080x1920, the returned image is 540x960.

Larger 2448x3264 image is returned in 612x816.

I'm giving displayImagePicker max size of 4096.

Cropped image bytearray

If I use displayImagePicker with crop = true, returned BitmapData is cropped but returned ByteArray is not cropped. Is there an option to return as cropped without doing JPEG encoding?

Does this extension work for Air 3.6 ?

I added this extension to my AIR game system (kidsplaymath.org). I am very great ful for the extension.

I do get the following error in the constructor for ImagePicker :

ERROR - Extension context is null. Please check if extension.xml is setup correctly

I noticed the extension.xml AIR SDK version is 3.1, do we need to build a new one if we are using 3.6 ? I am trying to solve it by building a new one but wanted to confirm here if you think this would solve the issue.
Thanks!

Callback is returning the file path as a string.

I am using the following code on an iPad mini and the callback seems to be returning the path to the file but when I try to access it using a URLRequest its saying the URL is not found.

`if (AirImagePicker.getInstance().isCameraAvailable())
{
AirImagePicker.getInstance().displayCamera(onImagePicked);
}

public function onImagePicked(status:String, image:String):void
{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.load(new URLRequest(image));
}`

If I try to use either of the following I get type conversion errors.

public function onImagePicked(status:String, bmd:BitmapData, ba:ByteArray ):void

public function onImagePicked(status:String,imageArray:Array):void

The Docs say its supposed to return a BitmapData instance representing the image, and a ByteArray instance containing a JPEG representation of the image but this isn't the case.

Camera crashes after several invocations

The example which comes with the ANE crashes if I invoke "Display camera" for more than 30 times (from 32 to 38 invocations). Tested on ipad mini 3 (iOS 10.3.2) and iPad Air 1 (iOS 10.3.3).

On iOS 10.0.2 it works perfectly. I tried more than 50 clicks on "Display camera" on my iPad Air 1. Is it possible to fix crashes?

Thank you!

latest source

is there a way to get the most recent source (the 64bit ios compatible)? Would like to modify the ane so that logging results can be accessed from a public property, instead of just being inside trace statements.

Thanks!

[Request] Display image on top of Camera preview

Hi Ataugeron,

Thanks for the great fresh work so far on this ANE. I have (hopefully a small) request, to improve the functionality of the extension. It will help me a lot.

Is it possible to give a bitmap (or bitmapdata) as an argument to the displayCamera function, that will be used as a overlay on the camera stream. As described in the here : http://www.musicalgeometry.com/?p=1273

Don't know about Android, but i guess that will be possible also.
Would be really cool to have this functionality, to display something on top of the camera overlay.

Thanks!
Tim.

PICASSA_NOT_SUPPORTED

This errors seems to be thrown when trying to load any remote images (Dropbox, Google+ etc).

Any chance this can be fixed? The default AIR Runtime has the same issue, and I downloaded this ANE mainly in the hopes that it would be able to open these images.

Please document the displayCamera callback

Struggling with this for days.

The readme says to refer to the ASDOC for the displayCamera callback
explanation, but no doc seems to be here.

Can you please just show the AS3 callback function & parms
for displayCamera's callback?

I have the manifest set correctly and I can call the camera
via the ANE. The camera displays and a photo can be taken. The photo
even lands in the displayCamera supplied Album name ok.

However the callback (where one would actually DO something with the image)
is never called.

I have tried this:

protected function onImagePicked(_status:String,
_bmdData:BitmapData = null,
_baData:ByteArray = null):void

and this:

protected function onImagePicked(_status:String, _mediaArgs:Array):void

... neither gets called upon saving the camera photo.

platform

. FlashPro CS6, pure AS3
. Android 4.2+
. latest ANE-ImagePicker

Crash on IOS when compiled with AIR 22 beta

The following code

if (AirImagePicker.getInstance().isImagePickerAvailable())
            {
                AirImagePicker.getInstance().displayImagePicker(chooseImageComplete);
            }

crash when compiled on IOS with Air 22 beta
it works well with every previous Air SDK

not working on android

It's not workign on my samsung galaxy s4.

AirImagePicker.getInstance().isImagePickerAvailable() return true but when i try with the standard code given to open it it does nothing

in logcat i tink the error i sas follow :

09-17 09:40:22.697: E/QcrilMsgTunnelSocket(8885): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory

here the complete logcat for that part :

09-17 09:40:18.493: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Entering isActionAvailable
09-17 09:40:18.503: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Entering getIntentForAction
09-17 09:40:18.503: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Exiting getIntentForAction
09-17 09:40:18.503: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Exiting isActionAvailable
09-17 09:40:18.503: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Entering displayImagePicker
09-17 09:40:18.503: D/AirImagePicker(9407): [AirImagePickerExtensionContext] Entering startPickerActivityForAction
09-17 09:40:18.513: I/CustomFrequencyManager(786): newFrequencyRequest - mFrequency = 1350000, mTimeoutMs = -1, mPkgName = ACTIVITY_RESUME_BOOSTER@6
09-17 09:40:18.513: I/CustomFrequencyManager(786): Boost Request from package = ACTIVITY_RESUME_BOOSTER@6 frequency : 1350000type = 6
09-17 09:40:18.513: I/CustomFrequencyManager(786): !! pkgName = ACTIVITY_RESUME_BOOSTER@6
09-17 09:40:18.513: I/CustomFrequencyManager(786): Request from package name pkgName = ACTIVITY_RESUME_BOOSTER@6
09-17 09:40:18.513: I/CustomFrequencyManager(786): mContext is Not Null mContext.pkgName = android
09-17 09:40:18.513: I/CustomFrequencyManager(786): 2 Old token will be reused!
09-17 09:40:18.513: I/CustomFrequencyManager(786): CPUDVFSControlRequest : doFrequencyRequest:: = 1350000 Timeout : -1
09-17 09:40:18.523: W/ActivityManager(786): mDVFSHelper.acquire()
09-17 09:40:18.563: W/ContextImpl(786): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1323 com.android.server.InputMethodManagerService$5.run:2283 java.lang.Thread.run:856
09-17 09:40:18.684: E/QcrilMsgTunnelSocket(8885): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory

Error when building

Hello,

I am trying to use this ANE and I get the following error when building:

Error occurred while packaging the application:

ld: warning: could not create compact unwind for __Unwind_Resume: non-standard register 0 being saved in prolog
ld: warning: could not create compact unwind for __Unwind_ForcedUnwind: non-standard register 0 being saved in prolog
ld: warning: could not create compact unwind for __Unwind_RaiseException: non-standard register 0 being saved in prolog
ld: warning: could not create compact unwind for __Unwind_Resume_or_Rethrow: non-standard register 0 being saved in prolog
Undefined symbols for architecture i386:
"OBJC_CLASS$_ALAssetsLibrary", referenced from:
objc-class-ref in libcom.freshplanet.AirImagePicker.a(AirImagePicker.o)
ld: symbol(s) not found for architecture i386
Compilation failed while executing : ld64

I have no idea what I am missing here, any clue?

I am using AIR SDK 3.6 and FB 3.7 (I also tried with AIR SDK 3.4).

Thanks!

I call Camera but nothing happens.

trace("IMAGE PICKER AVAIL?" + isImagePickerAvailable ? "YES" : "NO");
trace("CAMERA AVAIL?" + isCameraAvailable ? "YES" : "NO");

Both of these return yes. However, when I try to run it, the camera doesn't show up and nothing happens except my trace statement here.

		private function handleTrekAddPicture(e:TouchEvent):void 
		{
			trace("HANDLING ADD PICTURE");
			AirImagePicker.getInstance().displayCamera(imagePickedHandler);
		}

		````

64 bit

I get an error when using the ane with air sdk 16. Could the binary be updated to work?

Auto lighting/Nightshot-ish proprty for Android devices without a LED Camera flash

The Nexus 7, et al, do not have a LED flash and rely upon an automatic lighting feature in the devices' camera to handle low-lighting situations.

Requesting an ANEImagePicker .AutoLighting/Nightshot-ish property to handle Android devices without a LED Camera flash and access the internal auto lighting features of the device.

static libs

when I try to upload to appstore one application that contains this ANE, the apple support tell me the .ipa is not correct. The motive for this is the inclussion of statics .a in the package ANE.

The error:

Invalid Bundle Structure - Your package contains a bundle with the following issue: IPA bundle does not include a Payload directory.

Do you send me a new .ANE package without this statics libs?

thanks

Crash when displayCamera was called on iPad1

Hello,

I just call :
AirImagePicker.getInstance().displayCamera(callbackPicture);

Below a console copy :
Dec 18 14:55:28 unknown upst_ipad[14813] : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Source type 1 not available'
*** First throw call stack:
(0x358a588f 0x334c9259 0x3320f08b 0x58c603 0x58ccad 0x3e7f74 0x264b9c 0x52ccfb 0x52ca97 0x52bc6b 0x4f5e07 0x52c655 0x52bc6b 0x4f5e07 0x52c655 0x52c443 0x52bc6b 0x4f5e07 0x52c655 0x52c443 0x4fdc13 0x4f57b5 0x52b6a3 0x1e2578 0x1e20e4 0x1e1be4 0x1e2aa8 0x2a5594 0x2a5fdc 0x2a5da8 0x2a5908 0xb2ea0 0xb38e0 0xe13e0 0xe1394 0x17bdf8 0x17c36c 0x3434d0 0x17ed44 0xe02d8 0xe0490 0xf74c8 0xf7a04 0x10168 0x102b0 0x108e8 0x34ccb933 0x35879a33 0x35879699 0x3587826f 0x357fb4a5 0x357fb36d 0x33596439 0x32fd3cd5 0x100990 0x58c3ec)
Dec 18 14:55:28 unknown UIKitApplication:net.geturl.upst[0xfcd1][14813] : terminate called throwing an exception
Dec 18 14:55:28 unknown kernel[0] : launchd[14815] Builtin profile: PasteBoard (sandbox)

Dec 18 14:55:28 unknown ReportCrash[14816] : Formulating crash report for process upst_ipad[14813]
Dec 18 14:55:28 unknown com.apple.launchd[1] : (UIKitApplication:net.geturl.upst[0xfcd1]) Job appears to have crashed: Abort trap: 6
Dec 18 14:55:28 unknown SpringBoard[64] : Application 'UPST' exited abnormally with signal 6: Abort trap: 6
Dec 18 14:55:29 unknown ReportCrash[14816] : Saved crashreport to /var/mobile/Library/Logs/CrashReporter/upst_ipad_2012-12-18-145528_iPad-de-***.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

For information, displayImagePicker run good.

I test on a iPad 1 iOS5.1.1, compile with Flex4.6 + AIR3.6 ASC2.0 to FDT on Mac osX.7.5

If you want, I can send you the crash repport.

cheers,
Laurent

displayCamera finishPicking slow

Hi,

First of all thanks for this great extension which solves most of AIR CameraUI pitfalls and also the Stage3d issues (loose context, but recently it seems in a recent project I'm not loosing the context anymore which is good and strange...)

I have notice in iOS (iPhone4) it takes too long since the Camera UI disappears until the image is received (onStatus: "DID_FINISH_PICKING").

Maybe will be a good idea to dispatch a status like "processing image" or similar when the user press "USE" in the Native Camera UI.

Also is there any special reason to return a bitmapdata and a bytearray? (just wondering that this also slows down a little bit the whole process).

Luis

Android: Camera Error - "Cant connect to camera" on second attempt

Hello

SDK Air17.0 @ Android Nexus 5 Android 5.1.1 SDK22

I've integrated this ANE just fine and it works except for the fact, that when I try to use it a second time, to add another Photo to my Dictionary, The Camera throws an Android OS Error:

Camera Error
Can't connect to Camera

What is the best practise on this ANE to activate the native ImagePicker and to stably disable it again, to make it available for a new photoshot? Is it adviced to reinit each time or is there a workflow example of keeping the camera available? Also, is there a log I could parse to see why this Error happens? I've read in some places that the Nexus Series is prone for this error and It might be my dev device after all. Maybe ImagePicker supplies a ErrorEvent dispatcher for that?

Cheers
Mortimer

Launching Camera...

I created a new flash builder project with a single button to take a picture but I can't get it to actually launch the camera.

protected function button1_clickHandler(event:MouseEvent):void
{
if (AirImagePicker.getInstance().isCameraAvailable())
{
AirImagePicker.getInstance().displayCamera(function(image:BitmapData, data:ByteArray):void {
// Do something with the BitmapData or the JPEG-encoded ByteArray
trace ("got an image!");
});
}

The ane is installed and included and I get no errors. When I debug it it does run the displayCamera function but nothing seems to happen on my Nexus 10.

The main reason I'm interested in your ANE is that I've been having issues with the CameraUI with AIR. On my Nexus 10 it takes the picture just fine but randomly restarts my application. I don't know if Android is closing it or it's some context issue. It's extremely frustrating that it just doesn't simply work as Adobe claims.

Any help is greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.