Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Disconnected Mobile App data sync issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Disconnected Mobile App data sync issue

    Hi,

    I am working on a disconnected mobile app to collect some field data. I have some issue with Data Sync and wondering if somebody could explain if this is correct behaviour of the App settings I selected?
    I've a UX component which is packaged/distributed as an Android App using the Phone Gap Build. I've tried using following two settings:

    Option 1:
    UX component properties
    Restore Variable from Local Storage = True
    Restore data in List control from Local storage or (File System) = True

    List control Properties
    Persist data to Local Storage (or File System) = True
    Persist where = Local storage

    Result: I enter data while application is offline, then connect to network and complete Data Sync, all data Synced to the server as expected.


    Option 2:
    UX component properties
    Restore Variable from Local Storage = True
    Restore data in List control from Local storage or (File System) = True

    List control Properties
    Persist data to Local Storage (or File System) = True
    Persist where = FileSystem

    Result: I enter data while application is offline, then connect to network and complete Data Sync, all data collected offline is lost/overwritten by the data from the server.
    Am I doing something wrong here?

    I would also appreciate if somebody could explain what is the correct option to use for unlimited list control data storage on local device. My understanding is that "Local Storage" option have only 5MB limit and "FileSystem" allows unlimited data storage. But I am little confused about storage limits using the Phone Gap Build.

    Many thanks for your help.

    Shaz

    #2
    Re: Disconnected Mobile App data sync issue

    Option 2 should be working how you are imagining it should work and the data storage limit is basically limited to the size of your device's storage.

    When you connect back to the network, what do you call to start the sync process?
    What is the Synchronization Policy that you have set up in the List Builder's Detail View tab for the list?

    I would probably NOT check the server-to-client synchronization.
    I would manage my client-to-server sync and then maybe on the afterSynchronizeList event, call an incremental refresh.

    Comment


      #3
      Re: Disconnected Mobile App data sync issue

      I have found that switching from local storage to filesystem can cause some issues. In list properties change the list version. In properties change the persisted version number.

      You also need to have the right phonegap plugins for filesystem. Which I believe are File System, Device and File.

      Comment


        #4
        Re: Disconnected Mobile App data sync issue

        Lets suppose I've 5 records on the server and I collect 2 more records offline then after the sync there should be 7 records in total on the server. This is working fine using option 1, but using option 2, I lose 2 newly offline collected records after the sync and I can only see the 5 records both on the server and on mobile device.

        On Sync I am calling following two methods:
        {dialog.object}.saveListEdits('LIST1',{rows: 'allRows'});
        {dialog.object}.refreshListData('LIST1');

        There is no Synchronization policy setup in List Builder's Detail View.

        So am I right in understanding that, if I use Local Storage option and distribute Mob App using Phone Gap Build, its not limited to 5MB cache storage? Its only limited to the mobile devices storage?

        Thanks,

        Comment


          #5
          Re: Disconnected Mobile App data sync issue

          Add the incremental mode to your refreshListData
          And again, I would add the refresh code to the afterSynchronizeList event.
          The refresh is probably getting sent to the device before the saveListEdits has finished.

          Comment


            #6
            Re: Disconnected Mobile App data sync issue

            So am I right in understanding that, if I use Local Storage option and distribute Mob App using Phone Gap Build, its not limited to 5MB cache storage? Its only limited to the mobile devices storage?
            No... that's not right. Local Storage is limited to approx. 5Mb of volatile storage. If something in your device needs Local Storage... it will take it. FileSystemStorage is using whatever the internal storage the device has available.

            This might help a bit... although the doc, again, is wrong...
            https://www.alphasoftware.com/docume...rage/index.xml

            Persisting Data to Local Storage
            When you build an application for disconnected operation you need to be sure that the data in the application is persisted to Local Storage so that edits that are made to any data are not lost if the application is restarted before the user has had a chance to synchronize the data with the server.
            This is misleading... and just adds confusion. I wish Alpha would fix this stuff.

            You've not mentioned what version/build of Alpha you're using.... or the version of PGB you're using... or the back end database you're using... or the Android device / Android OS. Lots of info missing that could affect stuff.

            I've just tested an Android app build under the pre-release 4966_5071, PGB cli-7.1.0. The List Control is set to use FileSystemStorage, the UX is set to Restore data in List Controls... and everything else (i.e. Sync policies) are the default settings. Nexus 7 running 6.0.1.

            With Wifi shut off on the device... I can add/edit List data... shut down the app... turn Wifi on... start the App... Sync... and all edits and new List data is in my backend MySQL table.
            Last edited by Davidk; 03-22-2018, 11:59 AM.

            Comment


              #7
              Re: Disconnected Mobile App data sync issue

              Hi David,

              Details below:

              Alpha Version: 12.4.5.2
              Build: 4770_5018
              PGB cli-7.0.1
              SQL Server 2008 Express

              Please try following:

              Turn Wifi off, restart the Device, stay offline and start the App, enter new records, turn Wifi On and Sync.

              See if this replicates the problem I am having.

              Comment


                #8
                Re: Disconnected Mobile App data sync issue

                Sorry I missed a step:

                Turn Wifi off, shut down the app, restart the Device, stay offline and start the App, enter new records, turn Wifi On and Sync.

                Comment


                  #9
                  Re: Disconnected Mobile App data sync issue

                  Following your steps... no issues. What Android device, Android OS Version are you using?

                  I'll duplicate the same under Alpha 4770 and see what happens.

                  Comment


                    #10
                    Re: Disconnected Mobile App data sync issue

                    No issues under Alpha 4770 and PGB 7.0.1.

                    Your Alpha Dev is at 4770_5018. Is your Alpha Server at 4770_5018 as well?

                    Comment


                      #11
                      Re: Disconnected Mobile App data sync issue

                      Yes same Alpha Server Version ( I recently applied Alpha Security Alert Patch)

                      Device: Galaxy Tab S
                      Model: SM-T700
                      Android Version: 6.0.1

                      I've done further testing, please try this: turn off wifi, shut down the app, add new record, shut down the app again, open the app and recently added record will be gone.

                      You can also download and test my app from following link:
                      http://s3.amazonaws.com/android.phon..._1_4-debug.apk

                      Comment


                        #12
                        Re: Disconnected Mobile App data sync issue

                        Still no issues. Post the QRCode image... much easier to deal with... and I'll install your app.

                        Comment


                          #13
                          Re: Disconnected Mobile App data sync issue

                          May be it the issue of the selecting correct PhoneGap Plugins.

                          QR Code attached thanks.

                          HEADSE_QR.jpg

                          Comment


                            #14
                            Re: Disconnected Mobile App data sync issue

                            For some reason your app is producing the a File Write Error - Offline.

                            Here's what I'm seeing. While Offline... add a new record and Save. That record shows up in the List. Shut down your app. Start your app. That new record is not there.

                            Here is where Alpha starts to show it's untested code. The new record is added to the List... so you think everything is ok. But... even though Alpha knows there is an error... you'll only see it in debugging. There is no error that bubbles up to the user. This is terrible.

                            In my app, the record is still there... still marked with a blue triangle - which represents a new record waiting to be sync'd.

                            It's impossible to know what's wrong without seeing your app... the code being used... how it's set up... the plugins being used.

                            You should create a simple, List/Detail View only app... using all the standard buttons with their standard code... and test that.

                            Alpha_List_FileWirteErrorOffline.PNG
                            Last edited by Davidk; 03-23-2018, 01:54 PM.

                            Comment


                              #15
                              Re: Disconnected Mobile App data sync issue

                              Originally posted by shahzad.rashid View Post
                              May be it the issue of the selecting correct PhoneGap Plugins.

                              QR Code attached thanks.

                              [ATTACH=CONFIG]44703[/ATTACH]

                              Which plugins are you using. You need Device to have access to the filesystem, and you need filesystem to access the filesystem.

                              Comment

                              Working...
                              X