none
Offline sync for Cordova mobile app not working RRS feed

  • Question


  • I can't get Azure mobile Cordova default app (todoitem) to work in offline mode, specifically it can't go beyond store.defineTable code step  (as shown in the screen shot). What should I do to get this working?

    

    Azure mobile todoitem offline screenshot


    Monday, March 18, 2019 2:34 PM

Answers

  • @

    found it! the offline feature worked on the device, i.e. after I deployed the app to my tablet it did work in offline mode.

    The issue reported here as trying offline on Simulate In Browser. So I'm going to test offline feature on test tablet, but it would have been nice if it worked on Simulate In Browser or Google Emulate.

    AjayKumar thanks for responding to the ticket though!

    • Edited by ShlemonZaia Wednesday, March 20, 2019 2:21 PM
    • Marked as answer by ShlemonZaia Wednesday, March 20, 2019 2:21 PM
    Wednesday, March 20, 2019 2:19 PM

All replies

  • Just to confirm, do you receive an error message? Offline sync requires the cordova-sqlite-storage plugin, which automatically gets added to your app when the Azure Mobile Apps plugin is included in the project. Kindly ensure that the configuration is correct. If you haven’t done this already so, kindly try the sample outlined in the  document ‘Enable offline sync for your Cordova mobile app’ make appropriate changes based on your requirement and let us know the outcome for further investigation. 

    Tuesday, March 19, 2019 10:54 AM
    Moderator
  • Thanks for your reply, here are my answers to your questions:

    1- I don't receive an error message, it's just the code does not get after then part because local store is not working.

    2- Yes I have installed Azure Mobile Plugin App.

    3- Yes I have followed the link you send, BTW that code does not match the new sample code coming from Azure Mobile App but it's still fine in explaining the purpose.

    Tuesday, March 19, 2019 11:11 AM
  • Thanks for the update. Could you try with ‘var useOfflineSync = false’ and then check to see if that helps.

    ‘var useOfflineSync = ‘true’ – to use tables from local store.

    ‘var useOfflineSync = ‘false’ – to use tables on the server.


    Tuesday, March 19, 2019 1:02 PM
    Moderator
  • yes the app works fine when I have it on useOfflineSync  = false (online), but it does not work when it's offline ( var useOfflineSync = true)

    Tuesday, March 19, 2019 1:34 PM
  • @

    found it! the offline feature worked on the device, i.e. after I deployed the app to my tablet it did work in offline mode.

    The issue reported here as trying offline on Simulate In Browser. So I'm going to test offline feature on test tablet, but it would have been nice if it worked on Simulate In Browser or Google Emulate.

    AjayKumar thanks for responding to the ticket though!

    • Edited by ShlemonZaia Wednesday, March 20, 2019 2:21 PM
    • Marked as answer by ShlemonZaia Wednesday, March 20, 2019 2:21 PM
    Wednesday, March 20, 2019 2:19 PM