Git Product home page Git Product logo

Comments (4)

cdaringe avatar cdaringe commented on July 22, 2024

what is offline mode? is that an application defined thing or is it analogous to when the phone enters "airplane mode." if the latter, i wouldn't be surprised if the OS restricts HTTP calls (even local), so &-sync hangs/times out. are you using ampersand-sync (default w/ &-model) or have you used a different sync mechanism?

haven't ever done android dev, so i can't given in depth feedback, though am about to start on my first one :).

from ampersand-model.

jeremiehirsch avatar jeremiehirsch commented on July 22, 2024

Hello,

Offline mode is just the application switch and call all of data in the filesystem. eg: cdvfile://localhost/persistent/uploads/json/bootstrap.json instead of call external REST API.
The rest is same, and effectively i use ampersand-sync like this : this.listenTo(this.model, 'sync', this.ready); to sync data whatever the mode.

My main view seem be blocked and the models are empty.

Thank you!

from ampersand-model.

cdaringe avatar cdaringe commented on July 22, 2024

i've never tried to hit an endpoint where information served on the loopback is not explicitly served over http. it's not really a problem with &-model--&-model with REST mixin will make HTTP requests via xhr to the endpoint. if that endpoint doesn't serve JSON back, kaboom.

@AmpersandJS/core-team, has anyone seen a mobile friendly f/s sync published? @jeremiehirsch, my gut is that you need to override some methods in ampersand-sync to make a f/s read call, parse the json, and return that.

not a mobile expert, so take it with a grain of salt

from ampersand-model.

jeremiehirsch avatar jeremiehirsch commented on July 22, 2024

Hello,

It's strange because the json loaded have same architecture as the data returned when the app has the offline mode turned off, and on ios environnement it's alright! :|
That is very strange because if on my 'main view' i load my bootstrap model (the json file that maches) through jQuery.ajax the data has returned correctly in the inspector. It's because I thought that the problem came from ajaxConfig on ampersand-model in the android environment.

Thank you for your answers :)

from ampersand-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.