iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
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:
[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")]
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
Hello Yudi,
it seems that it was a problem on my side. Sorry for any inconvenience I may have caused you.
I carefully follow the steps to reproduce the reported problem in my local end by using:
The reported problem is not reproducible in my local end. "resultParameter.Result.ImageData" doesn't contains 0 bytes and the image picker isn't empty.
I created a video which shows Xamarin Studio and Android Screen Manager window (which is used to project the tab screen to PC) side-by-side. Please have a look at the attached video, Scenario1.zip, and feel free to let me know if you find anything that I might miss during my attempt in order to reproduce the problem.
I carefully test scenario 2 using the same detail as mentioned above. I was unable to reproduce these problems below:
I made a video which shows how the test was conducted on my local end. Please have a look at the attached video, scenario2.zip, and feel free to let me know if you find anything that I might miss during my attempt to reproduce the problem.
Sorry for any inconvenience this problem may have caused you. I was able to reproduce this problem in my local end. It has been forwarded to Crosslight development team. The report was filed under CROS-1125.
I will keep you informed with any news I heard from the team related to CROS-1125.
Sorry for any inconvenience this problem may have caused you. I was able to reproduce this problem in my local end. It has been forwarded to Crosslight development team. The report was filed under CROS-1126.
I will keep you informed with any news I heard from the team related to CROS-1126.
Hoping to find a work around for scenario 1 and 2, I did the following: In the "ExecuteActivateImagePicker" of the "EditorViewModelBase"...
I didn't test scenario 5 yet since problems in scenario 1 and scenario 2 are not reproducible in my local end.
Look forward to hearing back from you.
I just watched your videos and you did it in the same way as I did it, except the wrong behaviour.
I did my initial tests on a Motorola E2 phone with Android 5.1 and API 21.
I just downloaded the sample from the url in your post. I opened the project and upgrade to Crosslight 5 Update 2. I cleaned the solution and tested with my Galaxy Tab SM-T310, Android 4.4, API 19. Here are the results:
- Starting the sample as is and taking and cropping a photo works multiple times. I always get the thumbnail in ImageData and ThumbnailData.
- Modifying the code of Item.FormMetadata like in "scenario1" and taking a photo works multiple times. I always get the image in ImageData and Thumbnail is null.
- Modifying the code of Item.FormMetadata like in "scenario2" and taking and cropping a photo works multiple times. I always get the image in ImageData and the thumbnail in ThumbnailData.
So, on a tablet with API 19 it works on my end, too. Either the problem is the phone or the different API level. Please, test again.
Thank you for the information. So today, I re-test scenario1 using phone with following detail: LG Nexus 4 running Android 5.1.1 Lollipop.
The problem was not reproducible using the test phone. Please review the attached video which shows how the testing conducted in my local end.
I'm not sure if this makes the difference, but my phone has Android 5.0.2.
I have some further information about the bug. After taking the photo the second time, I get an error message. Please, see attached screenshot.
In the output window I have the following:
The thread 'Unknown' (0x2) has exited with code 0 (0x0).05-06 10:19:32.590 W/ContextImpl( 4232): Failed to ensure directory: /storage/sdcard1/Android/data/tea.net.ch.app.droid.voucherdepot/cacheException:
Java.Lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
Thread finished: <Thread Pool> #405-06 10:20:01.451 D/Mono ( 4232): [0xb98275d0] worker finishingThe thread '<Thread Pool>' (0x4) has exited with code 0 (0x0).
-------------------------
Maybe this will help you finding the problem.
AddOn: Because of the error message, I just added the following to the manifest, but it changed nothing.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Hello Thomas,
Thank you for providing the information from the Output window. I'm interested to dig up more information based on the following: "Failed to ensure directory: /storage/sdcard1/Android/data/tea.net.ch.app.droid.voucherdepot/cache".
Could you please inform me about the action before exception persist? Did you select image of ImagePicker by taking photo (using camera), or pick an image from Gallery?
the action was taking a photo using the device camera (the second time - first time works without exception).
Choosing an image from gallery seemed to work without exception.
Hope this helps.
Could you please perform the following and re-test the reported problem?
this changed nothing. See output log:
05-12 09:18:31.303 W/ContextImpl(21611): Failed to ensure directory: /storage/sdcard1/Android/data/tea.net.ch.app.droid.voucherdepot/cache
Exception:
Thread finished: <Thread Pool> #2
Thread finished: <Thread Pool> #3
05-12 09:18:47.578 D/Mono (21611): [0xb981b960] worker finishing
Thread started: #10The thread '<Thread Pool>' (0x2) has exited with code 0 (0x0).
The thread '<Thread Pool>' (0x3) has exited with code 0 (0x0).
05-12 09:19:01.405 D/skia (21611): --- SkImageDecoder::Factory returned null
Thread started: #11
I tried your proposed solution with the inventory sample and my solution I sent to you. Both with the same error. Taking the photo twice leads to the error (SkImageDecoder::Factory returned null).
The output of the inventory sample is a bit different and the null pointer exception did not happen here, but in the end it is the same SkImage::Factory returned null error.
05-12 09:37:01.519 I/AppCompatDelegate(23277): The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
05-12 09:37:03.766 W/ContextImpl(23277): Failed to ensure directory: /storage/sdcard1/Android/data/MyInventory.Android.Material/cache
05-12 09:37:04.046 W/IInputConnectionWrapper(23277): showStatusIcon on inactive InputConnection
05-12 09:37:10.166 W/ContextImpl(23277): Failed to ensure directory: /storage/sdcard1/Android/data/MyInventory.Android.Material/cache
05-12 09:37:12.170 D/Mono (23277): [0xb948d0c0] worker finishing
Thread finished: <Thread Pool> #5
The thread '<Thread Pool>' (0x5) has exited with code 0 (0x0).
05-12 09:37:15.308 D/skia (23277): --- SkImageDecoder::Factory returned null
05-12 09:37:15.328 D/skia (23277): --- SkImageDecoder::Factory returned null
05-12 09:37:15.329 D/skia (23277): --- SkImageDecoder::Factory returned null
Did this help to find the bug?
Android 5.0.2!!!!!!!!!!!!!!!!!!!
Scenario 1
Please take a look at the attached video, Scenario1OnAndroid502.mp4, which shows the test result.
Scenario 2
I carefully test scenario 2 using the same detail as mentioned above (including the Android emulator) and I was unable to reproduce these problems below:
Please have a look at the attached video, Scenario2OnAndroid502.mp4, and feel free to let me know if there is anything that I might miss during my attempt to reproduce the problem.
Thank you for your patience in finding a solution for the reported problem.
I will check your videos shortly. In the mean time I have a question. I'm not sure if it helps, but could you send me a signed apk package of your sample. A store ready apk would be best. I could install this on my test device and see what happens. Maybe the root of the issue is my dev environment.
Please find the signed apk package in here.
I just tested on the Motorola E2 (Android 6 API 23) device.
Same bad result. Taking the picture for the second time fails. The app who should crop the picture says "picture could not be loaded".
So, it is not my dev environment.
Maybe it's worth buying the trouble maker: http://www.amazon.de/Motorola-Generation-Smartphone-Touch-Display-Speicher/dp/B00TZS21ZK/ref=sr_1_2?ie=UTF8&qid=1463746587&sr=8-2&keywords=motorola+e2+generation
When will CROS-1125 and CROS-1126 be fixed? I am waiting for weeks now. This is so annoying. Please, get into gear.
Sorry for any inconvenience this problem may have caused you. Build 662-experimental is now available in NuGet which addressed following issues: CROS-1125 and CROS-1126. Please give it a spin and let us know how it works in your end.
Note:CROS-1125ExecuteSave in ViewModel is now fired when user press "Save" button in the toolbar after navigate to "View larger".CROS-1126Changes that were made on editor view model aren't loss now.
I did a quick test and it seems to work. Unfortunately, the fix for
http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-Form-Builder---Nullables/
is not included in this experimental version, so the hotfix is kind of useless. I need a version which contains all bug fixes. Please, build such a version as soonest as possible.
Thanks,Thomas
Per my test, the fix for: Crosslight Form Builder - Nullables is included.
I created a video which shows the test of Crosslight build 662-experimental against CROS-1128 (reported in the above thread). The reported problem: "The Amount field is now not empty. It shows 123,50" is no longer persist. The Amount field is empty after user clear the Amount field.
Should you find anything that I miss during my attempt to reproduce the reported problem, please feel free to let me know.
Glad to hear the good news.
Should you need further assistance or run into any problems regarding our controls, feel free to contact us through our live chat service or post it into our forum. We would be happy to assist you again.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname