Crosslight MyInventory - FormBuilder

20 replies. Last post: June 10, 2016 3:46 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hello Crosslight Support,

I just upgraded the MyInventory sample (app-inventory-masterdetail-master) to Crosslight 5.0.5000.632.

Please, do the following tests on Android, because there are a lot of FormBuilder related bugs. Maybe these issues exist on iOS, too.

Scenario 1:

Item.FormMetadata

[Editor(EditorType.Image)]

[Image(Height = 83, Width = 80, Placeholder = "item_placeholder.png", Frame = "frame.png", FramePadding = 6, FrameShadowHeight = 3)]
[ImagePicker(ImageResultMode = ImageResultMode.Both, AllowEditing = false, UseThumbnailResult = false, ActivateCommand = "ActivateImagePickerCommand", PickerResultCommand = "FinishImagePickerCommand")]

public static byte[] ThumbnailImage;

I start the app, click on one of the items in the list. In the detail view I click on edit. In the edit view I take a new photo. After confirming the taken photo I hit "ExecuteFinishImagePickerCommand" and "resultParameter.Result.ImageData" contains the taken photo as byte array. The new photo shows up in the image picker. Now, repeat this. I hit "ExecuteFinishImagePickerCommand" again, but now "resultParameter.Result.ImageData" contains 0 bytes and the image picker is empty.

Scenario 2:

Item.FormMetadata

[Editor(EditorType.Image)]

[Image(Height = 83, Width = 80, Placeholder = "item_placeholder.png", Frame = "frame.png", FramePadding = 6, FrameShadowHeight = 3)]
[ImagePicker(ImageResultMode = ImageResultMode.Both, AllowEditing = true, UseThumbnailResult = false, ActivateCommand = "ActivateImagePickerCommand", PickerResultCommand = "FinishImagePickerCommand")]

public static byte[] ThumbnailImage;

I start the app, click on one of the items in the list. In the detail view I click on edit. In the edit view I take a new photo. After confirming the taken photo, I crop the photo and confirm again. I hit "ExecuteFinishImagePickerCommand" and "resultParameter.Result.ImageData" contains the taken photo as byte array the "ThumbNailData" contains the thumb as byte array. The new photo shows up in the image picker. Now, repeat this. After confirming the taken photo, the crop app complains with "picture cannot be loaded". Then I hit "ExecuteFinishImagePickerCommand" again, but now "resultParameter.Result.ImageData" contains 0 bytes, "ThumbNailData" is null and the image picker is empty.

Scenario 3:

I start the app, click on one of the items in the list. In the detail view I click on edit. In the edit view I choose "View larger" in the image picker context menu. I see a larger version of the picker and go back to the edit view. Now, I click on the "Save" icon in the top right corner, but I never hit the "ExecuteSave" method. This only happens when I navigate to "View larger" before saving.

Scenario 4:

When I change some text before navigating to "View larger" and the focus is still in the text field while changing the view, the changes are lost when navigating back.

Scenario 5:

Hoping to find a work around for scenario 1 and 2, I did the following: In the "ExecuteActivateImagePicker" of the "EditorViewModelBase", I set "activateParameter.UseDefaultPicker = false;" to show do a custom action. The custom action is:

this.MobileService.Camera.Capture(new CameraCaptureSettings()
{ AllowEditing = true, CaptureMode = CameraCaptureMode.Photo, DeviceKind = CameraDeviceKind.Rear, FlashMode = CameraFlashMode.Auto, ImageResultMode = ImageResultMode.Both, MediaType = CameraMediaType.Photo, ThumbnailHeight = 80, ThumbnailWidth = 80 }, (result) =>
{
this.Item.CameraImage = result.ImageData;
this.Item.ThumbNail = result.ThumbnailImageData;
});

Settings "AllowEditing true or false" and taking the photo twice leads to the same results as in scenario 1 and 2. The second time, there is no image data. Doing this two times is not an uncommon user behaviour. So, the bug seems to exist for the regular camera capture service, too.

Please, fix asap.

Thanks,

Thomas

All times are GMT -5. The time now is 11:37 AM.
Previous Next