Image Cropping Return Null Data

You must Login before you can answer or comment on any questions.

Below is my Code, I am trying to allow User to Select Image from Gallery and Crop it and show cropped image in ImageView on ANDROID

Titanium.Media.openPhotoGallery({ success:function(event) { var houseimage = event.media; var intent = Ti.Android.createIntent({ action: "com.android.camera.action.CROP", data: houseimage.nativePath, type: 'image/*', //flags: Ti.Android.FLAG_ACTIVITY_REORDER_TO_FRONT, //packageName: 'com.android.gallery', //className: 'com.android.camera.CropImage'

            });
            //intent.ad
            intent.addCategory(Ti.Android.CATEGORY_DEFAULT);
            //intent.
            //intent.putExtra("crop", "true");
            intent.putExtra("outputX", 200);
            intent.putExtra("outputY", 200);
            intent.putExtra("aspectX", 1);
            intent.putExtra("aspectY", 1);
            intent.putExtra("scale", true);
            intent.putExtra("output", houseimage.nativePath);
            intent.putExtra("return-data", true );    
            //intent.putExtra("output", true );

            var activity = Ti.Android.currentActivity;
            activity.startActivityForResult(intent, function(param){                    
                var toast = Ti.UI.createNotification({
                message:JSON.stringify(param.intent) + JSON.stringify(houseimage),
                duration: Ti.UI.NOTIFICATION_DURATION_LONG
            });
            toast.show();
            });

            // set image view
            //Ti.API.debug('Our type was: '+event.mediaType);
            //backgroundImageView.fireEvent('setImage', {pic:houseimage});

        },            
        mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]
});

But i Always get Notifications as {"flags": 0, "type": null, "data": null, "action": "inline-data"}

Can anyone Suggest, where am i going wrong

Your Answer

This question has been locked and cannot accept new answers.