Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: displayImagePicker function don't work properly. #59

Open
jkpatel1463 opened this issue Sep 14, 2017 · 0 comments
Open

Android: displayImagePicker function don't work properly. #59

jkpatel1463 opened this issue Sep 14, 2017 · 0 comments

Comments

@jkpatel1463
Copy link

Hello

Here is the code which i am executing to pick image from gallery:

public function pickImage(callback:Function, cropping:Boolean = false):void
{
	trace("ImagePickHelper - pickImage: " + AirImagePicker.instance.getGalleryPermissionStatus().value);
	if (AirImagePicker.instance.getGalleryPermissionStatus() ==AirImagePickerPermissionStatus.DENIED 
		|| AirImagePicker.instance.getGalleryPermissionStatus() ==AirImagePickerPermissionStatus.RESTRICTED){
		callback(AirImagePickerRecentImagesEvent.PERMISSION_ERROR);
		return;
	}
			
	_callback = callback;
	AirImagePicker.instance.displayImagePicker(-1, -1, cropping);
}

Android Log, for all devices which are listed below:

09-14 09:40:45.216 515-803/? I/ActivityManager: START u0 {cmp=air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity (has extras)} from pid 7671
09-14 09:40:45.319 515-526/? V/ActivityManager: ACT-Launching: ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}
09-14 09:40:45.363 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] Entering onCreate
09-14 09:40:45.363 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] my package name:air.APP_PACKAGE_ID
09-14 09:40:45.364 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] Exiting onCreate
09-14 09:40:45.377 7671-7671/? I/air.APP_PACKAGE_ID: [AirImagePicker] GalleryActivity
09-14 09:40:45.569 515-1105/? V/ActivityManager: Activity idle: Token{41fcacb0 ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}}
09-14 09:40:45.569 515-1105/? V/ActivityManager: Stopping ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}: nowVisible=false waitingVisible=true finishing=false
09-14 09:40:45.850 515-533/? V/ActivityManager: Stopping ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}: nowVisible=true waitingVisible=true finishing=false
09-14 09:40:45.885 515-515/? V/ActivityManager: Stopping ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}: nowVisible=true waitingVisible=false finishing=false
09-14 09:40:45.885 515-515/? V/ActivityManager: Ready to stop: ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}
09-14 09:40:45.900 515-2493/? V/ActivityManager: Activity stopped: token=Token{41fcacb0 ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}}
09-14 09:40:49.639 515-820/? V/ActivityManager: air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity: task=TaskRecord{4216c898 #8 A air.APP_PACKAGE_ID U 0}
09-14 09:40:54.409 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] Entering onCreate
09-14 09:40:54.409 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] my package name:air.APP_PACKAGE_ID
09-14 09:40:54.409 7671-7671/? D/AirImagePicker: [ImagePickerActivityBase] Exiting onCreate
09-14 09:40:54.440 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Entering getOrientedSampleBitmapFromPath
09-14 09:40:54.546 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Entering getOrientedBitmapFromBitmapAndPath
09-14 09:40:54.551 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Exiting getOrientedBitmapFromBitmapAndPath
09-14 09:40:54.551 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Exiting getOrientedSampleBitmapFromPath
09-14 09:40:54.551 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Entering resizeImage: -1 x -1
09-14 09:40:54.552 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] resized image to: 1 x 1
09-14 09:40:54.552 7671-7671/? D/AirImagePicker: [AirImagePickerUtils] Exiting resizeImage
09-14 09:40:54.555 7671-7671/? I/air.APP_PACKAGE_ID: [AirImagePicker] GalleryActivity
09-14 09:40:54.561 7671-7671/? I/air.APP_PACKAGE_ID: status: AirImagePickerDataEvent_onImageChosen
09-14 09:40:54.566 515-526/? V/ActivityManager: Enqueueing pending finish: ActivityRecord{41eb89a0 u0 air.APP_PACKAGE_ID/com.freshplanet.ane.AirImagePicker.activities.GalleryActivity}

Here are the list of devices which faces the issues:
Device: Micromax A116
OS: Android 4.2.1
Device Link: http://www.gsmarena.com/micromax_a116_canvas_hd-5256.php

Device: Motorola Nexus 6
OS: Android 7.1.1
Device Link: http://www.gsmarena.com/motorola_nexus_6-6604.php

Device: Moto G (2nd Generation)
Os:Android 6.0
Device Link: http://www.gsmarena.com/motorola_moto_g_dual_sim_(2nd_gen)-6648.php

Device: Samsung Galaxy S III
Os:Android 4.3
Device Link: http://www.gsmarena.com/samsung_i9300_galaxy_s_iii-4238.php

Here is the issues details:

  • When i execute this code, ANE show two time image picker, It is executing in the way:
  1. Display Image picker
  2. Pick a image from gallery
  3. It shows image picker for second time instantly.
  4. Again pick the image and it shows 1x1 image after conversion. I need it in original resolution as it is in gallery.

When i testing a the app, i found that:

  • When i pick the image from gallery, its size is 92.68KB at that time, ANE do not shows second time image picker, but again it give me 1x1 image.

If any information is missing, let me know.. I am also trying to solve the issues and will commit the code, please review it when available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant