Alpha Video Training
Results 1 to 15 of 15

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,757

    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,757

    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,757

    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,757

    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,757

    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.

  11. #11
    Member
    Real Name
    jim wilson
    Join Date
    May 2019
    Posts
    23

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

    this seems like a real PITA. You mean this "mature" expensive development environment can't reliably take pics on a phone and upload them to a server? is this for real?
    "I'm afraid this has always been a bit of a mess... and it hasn't improved. It's always a struggle." - how hard can this be for them to get it right?
    I need to start doing a similar thing and have chosen this tool because of offline/disconnected ability. I need to take a pic and get a signature upon doing a delivery - and I've found several threads of people doing a similar thing and there's always problems. Should I punt and find another tool?

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

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

    First, you should rebuild with the current release. 6012 was an absolute mess. Although, this feels like a problem that's been around for a while.

    If you find the same issue with the current release, then you should report it to Alpha. You should have reported this a month ago... why didn't you?

    Alpha is old, but by no definition, mature. There is a dependence on developers to find bugs because Alpha has no internal testing protocol.
    Last edited by Davidk; 11-21-2019 at 02:47 AM.

  13. #13
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    242

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

    We deal with full size images in disconnected mode all the time. Alpha Anywhere can work fine for you but there are several considerations. Here are a few things we do:

    1. Rename - For us, we don't care what the image name is, we just want it stored and retrieved. Therefore, we choose the rename option for both the full size image and the thumnail image
    2. Filename Suffix - Make sure to add Thumbnail to the File Name Suffix of the Thumbnail. That way on the server you can see which images are supposed to be thumbnails.
    3. Separate Folder - store thumbnails in a different folder on the server

    NOTE:

    1. This may not apply in your case, but it's good to know: If you have a parent list and the images are in a sub list, separate out the images and link the images by a device generated GUID (the GUID would be generated when you create the parent record and stored in a field in that record). Then have users sync the images separately when they have a good connection. In WV we have terrible connectivity (as slow as 1x), and therefore we have to really control the sync process with images. In your case, users may have a better data connection when they sync and this isni't an issue.

    2. Thumbnail creation - If you want the users to see thumbnail in the list prior to syncronizing (remember the thumbnail is generated on the server) you can generate one using javascript on the client side.

    3. Keep in mind each app has different needs. Alpha Anywhere gives you the tools - but you have to make it work for your situation.

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

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

    The images solutions for mobile, for Lists, etc. in Alpha are a befuddled mess.

    Alpha Anywhere gives you the tools - but you have to make it work for your situation
    How long did it take you to hit upon the process that would work for you... how many posts... how much help?

    It's not too horrible once you've been through the painful process of finding out what works and what doesn't... what's a bug and what isn't.

    Once we have something that works... we tend to forget the slogging that got us there.

  15. #15
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    242

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

    Hi David,

    You are right about that. it did take a while to figure out how to get it to work. Alpha Software did help with some things, but because we were in uncharted territory to some degree - it was a learning curve for us and Alpha Software. Selwyn ended up adjusting some things in how Alpha Anywhere handled images on the server, and that helped a lot. That was about 2.5 - 3 years ago or so. I don't think much has changed since then in how Alpha Anywhere deals with images. It would be great if you could choose a use case and Alpha would, by default, set it up correctly for you and then you could customize from there.

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
  •