Alpha Video Training
Results 1 to 10 of 10

Thread: List Control - Detail View - Image Sync issue

  1. #1
    Member
    Real Name
    Philip Fraczkowski
    Join Date
    Nov 2015
    Location
    Victoria BC
    Posts
    6

    Default List Control - Detail View - Image Sync issue

    Hello everyone,

    I am in the process of developing a fairly simple phonegap application. The purpose of the app is to take pictures with a mobile device (Samsung Tablet A 10.1 2019) in the field and sync with the remote server(WAS).

    The application is built using a list control with a detail view. The list records in a snaking format composed of thumbnails. The detail view is composed of a image bound control (created by the list) and a text box to hold the image description. The images are captured using "Image Capture for List-Detail View - Camera/Photo Library." The settings for the image capture are simple:

    Capture Method: PhoneGap
    Capture Mode: filename
    Image File Size: -1 ( this is not ideal however the client wants full quality)
    Image Quality:100

    The issues start when synchronizing with the remote WAS. The image captured on the device is crystal clear, it uploads to the server successfully then the device downloads the image back(not sure why, I may lack understanding as to why it does). In any case, the image that is returned from the server is smaller in size and the quality is fairly poor (I assume the aspect ratio gets gets lost somewhere). The problem is that the behavior is not consistent. Some images are perfectly fine and others are bad. There is no pattern from what I can see. In addition, if i update the the description text box and save the change, the image restores quality. It is as if a reference got messed up in the background and updates itself when saved. I cannot make heads or tails of it.

    If anyone can help or has resolved something like similar, I would be forever thankful.

    Alpha Build Version: Build 6012_5338

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,723

    Default Re: List Control - Detail View - Image Sync issue

    Zip and post your UX. There are a mish-mash of properties available for Lists and Photos and PGB. It seems like it should be simple and straight forward... but it rarely is.

  3. #3
    Member
    Real Name
    Philip Fraczkowski
    Join Date
    Nov 2015
    Location
    Victoria BC
    Posts
    6

    Default Re: List Control - Detail View - Image Sync issue

    I totally agree with you on that one. I will send you the zipped UX privately.

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,723

    Default Re: List Control - Detail View - Image Sync issue

    What plugin are you using to capture images?

    When the app first starts, are you seeing the image thumbnails in the List?

  5. #5
    Member
    Real Name
    Philip Fraczkowski
    Join Date
    Nov 2015
    Location
    Victoria BC
    Posts
    6

    Default Re: List Control - Detail View - Image Sync issue

    We are currently using, "Camera with Exif" from the "Required Third Party PhoneGap Plugin" check box list. I have confirmed that the latest version is being used in the app.

    Yes, when the app first starts the image thumbnails appear fine.

    I am currently reviewing the File and File Transfer plugins.

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,723

    Default Re: List Control - Detail View - Image Sync issue

    Odd. With a few records in place, the app starts and there are no thumbnails displayed... just broken image icons. If I use your menu refresh then I get thumbnails.

    I'm also using Camera with Exif.

    What I'm not seeing is a problem with the images... they all look ok. But, I am using a Huawei 6P phone... not a tablet.
    Last edited by Davidk; 10-17-2019 at 10:06 PM.

  7. #7
    Member
    Real Name
    Philip Fraczkowski
    Join Date
    Nov 2015
    Location
    Victoria BC
    Posts
    6

    Default Re: List Control - Detail View - Image Sync issue

    Weird. I will test it out on my phone. Who know's, maybe the tablet is doing something I am not aware of. I will get back to you shortly.

  8. #8
    Member
    Real Name
    Philip Fraczkowski
    Join Date
    Nov 2015
    Location
    Victoria BC
    Posts
    6

    Default Re: List Control - Detail View - Image Sync issue

    David,

    I performed some more testing on with my phone and tablet. unfortunately, the issue keeps happening. I started braining storm and decided to review the actual photo/thumbnail files on the device after synchronization and discovered something interesting. The photo file is overridden by the thumbnail file and vice versa. I reviewed the Alpha configuration and found the following:

    Target Filename (default):
    return '<DeviceId>_' +e.object.listFieldName + '_' + A5.ts() + '_' +e.name

    Photo Upload Folder Definition :
    "photo/<ShortFilename>"

    Thumbnail Folder Definition:
    "photo\thumbnails\<ShortFilename>"

    The above configuration is pretty standard I think. The interesting stuff begins during the sync process. When syncing to the mobile device the process sticks the images in the list folder on the device as expected. However, there is no secondary folder for thumbnails. Light bulbs started going off. I reviewed the file details and image resolutions on the mobile devices and found that the photo file is being overridden by the thumbnail. This is because both files have the same <ShortFilename>. It looks like there's some form of a race condition doing on with respect to the images being downloaded. My assumption is that the sync process selects which ever file first and then downloads them sequentially overriding each other at the end. For example if the thumbnail file finished downloading first it is overridden by the master photo file. Vice Versa, if the photo is downloaded first it is then overridden by the thumbnail file. This is where the so called photo quality is lost well not really, I am simply opening up the thumbnail file thinking my original image was ruined.

    I think I can resolve this issue by simply adding a tag to the thumbnail file, for example "thumb_<ShortFileName>". I hope this works. I will let you know.

  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,723

    Default Re: List Control - Detail View - Image Sync issue

    Good sleuthing... and matches what I'm seeing on an iPad Pro 12.9". I'm not sure you can see the problem on a phone, but it sure is evident on a big screen.

    I came to the same conclusion... that the thumbnail is being used as the image.

    As you found, updating the description, saving, and syncing fixes the issue... but only for that save. A refresh, or restart, of the app will show the same issue.

    I physically changed the names of the 4 thumbnail images... adding "thumb_" as a prefix... and then changed the sql data to match. I only have 4 test records.

    That seems to have worked.

    Then I changed the Alpha thumbnail definition... adding "thumb_" as a prefix... but Alpha is ignoring it. And... now I'm not getting a thumbnail image displaying.

    I'm afraid this has always been a bit of a mess... and it hasn't improved. It's always a struggle.
    Last edited by Davidk; 10-18-2019 at 01:23 PM.

  10. #10
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,723

    Default Re: List Control - Detail View - Image Sync issue

    As well, and as with the Android phone, on the iPhone and iPad I'm not seeing any images in the list until I perform a List refresh.

Similar Threads

  1. Disconnected List Control / Detail View - List remains dirty after sync
    By frankiez in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 06-28-2017, 06:03 AM
  2. Replies: 8
    Last Post: 04-27-2017, 10:26 AM
  3. Simulating List Detail View Sync Errors
    By lilmofo812 in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 11-26-2016, 06:26 PM
  4. Replies: 1
    Last Post: 05-27-2015, 12:02 AM
  5. Replies: 12
    Last Post: 10-18-2014, 05:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •