3 ms·
Did you build that system yourself? I worked on an app for Android that did a few similar things, and tried at first to build all of the sync machinery myself.
by ufmace 9y ago
Did you build that system yourself? I worked on an app for Android that did a few similar things, and tried at first to build all of the sync machinery myself. After spending a little time wresting with getting it working, I eventually discovered that Android really wants you to use the [0]System AbstractThreadedSyncAdapter class to do all of that, and let the Android system handle the details of periodic retries, network connections, and all of those other details for you.
I bring that up because this seems to be a common pattern in Android development, where in contrast to native desktop work, you look to the system first to do anything hard, and only build things yourself if the system absolutely can't do it, or the way the system does it can't be bent to do what you need. I'm not sure how much this applies to iOS development too, but I presume it's similar.
That means that hybrid development may be much more practical than you would think, because you aren't supposed to be building the things that are hard in hybrid/JS, as the system already handles it for you much better than you could. I'm not actually sure how these hybrid frameworks handle calling out to things like that, presumably they have a way to abstract it out, since they wouldn't have much point to existing without that.
[0] https://developer.android.com/training/sync-adapters/creating-sync-adapter.html https://developer.android.com/training/sync-adapters/creatin...
- valuearb 9y agoYea, I'm not that familiar with Android yet, it is next on my project timeline. One part of my decision was I wanted to learn Android, again to understand how to do everything the best possible way on native, before trying any cross platform code that insulated me from the OS.