SlideShare a Scribd company logo
1 of 23
DEVELOPING ANDROID CLIENT APPS
VIA SYNCADAPTER
Anatoliy Kaverin
Lohika @ 2013
SESSION AGENDA
 Why?
 SyncAdapter!? LOLWUT?
 The big picture
 Puzzles
 Does anybody use it?
 Code samples, documentation
 Q&A
2
IMAGINE…
SIMPLE CLIENT-SERVER APP
3
SYNC CACHE: ISSUES TO CONSIDER
Are we done?
 Global Sync setting
 Bandwidth starvation
 YES, queued
 YES, even duplicates
 YES, even if app is off
 YES, built in support
Hand-made  SyncAdapter framework
 Network availability
 Pending queue
 Refresh on network
 Periodic update
 YES, manual override
 YES! YES! YES!
4
SYNCADAPTER!? LOLWUT?
 Well, you probably use it everyday…
5
THE BIG PICTURE – BASIC FLOW
6
THE BIG PICTURE – PUZZLES
7
PREREQUISITES TO CONSIDER
 Network layer separation
 Plain implementation
 Sync status field for synced entities
 Usually NOOP, Created, Updated & Deleted
 Consider the field in UI flows
 Consider partial sync
 For better performance to sync only local delta
8
PUZZLES – ACCOUNT (1)
 Key Features
 Manage credentials;
 Safe system store;
 Multitenant support
 Sync related
 Token caching and invalidation
 Alternative flow to login or sign in
 Store extra data with account
9
PUZZLES – ACCOUNT (2)
 Checklist:
 Implement Authenticator
 Implement Authentication Service
 Define configuration in XML
10
PUZZLES – ACCOUNT (3)
 Checklist:
 Register Authentication Service in AndroidManifest
 Add permissions
 APIs to use:
 android.accounts.AccountManager to work with accounts
 android.accounts.Account to store credentials
11
PUZZLES – CONTENT PROVIDER (1)
 Key features
 Heart of DAO
 Resource effective
 Cursor, resource-effective scalability
 Power of Joins
 Built-in ListView refresh via ContentObserver & Cursor
 Sync related
 Acts as mediator for sync and UI layers
 Supports automatic delta upload sync
 NOTE: Can be fake one, but you’ll lose a lot of magic 
12
PUZZLES – CONTENT PROVIDER (2)
 Minimal implementation based on
https://github.com/novoda/SQLiteProvider
 Supports all CRUD
 Supports DB versioning
 And even more…
13
PUZZLES – SYNCADAPTER (1)
 Key features
 Plugin to Android SyncManager
 SyncManager manages queue of execution
 Adapter is executed in background thread & when
network is available
 Sync related
 Scheduling & automated mode
 Respects system settings
 Can be overridden by manual request
 Partial sync supported
 Upload only local delta
 Any other criteria (Bundle) 14
PUZZLES – SYNCADAPTER (2)
 Checklist
 Implement SyncAdapter class
 Implement Sync Service
 Define configuration xml
15
PUZZLES – SYNCADAPTER (3)
 Checklist
 Register Sync Service in AndroidManifest
 Add permissions
 APIs to use
 android.content.ContentResolver to reach SyncManager
programmatically
16
PUZZLES – SYNCADAPTER (4)
 How to trigger sync?
 Upload delta
 ContentResolver.notifyChange
 Be aware of cyclic calls if used in ContentProvider
 Scheduling
 ContentResolver.addPeriodicSync
 Automated
 ContentResolver.setSyncAutomatically
 Manual
 ContentResolver.requestSync
 Manual forced
 ContentResolver.requestSync
 Pass SYNC_EXTRAS_MANUAL in bundle
17
THE BIG PICTURE – OPTIONAL PUZZLES
18
PROS & CONS
 Pros
 Simplify server interaction
 A lot of work handled by framework
 Resource effective – the Android way
 Cons
 A lot of puzzles, hard to start…
 Lack of documentation
 Error handling
 Bugs 
19
DOESANYBODYUSEIT?
20
DOCUMENTATION
 Official docs
 Great tutorial added in August ’13
http://developer.android.com/training/sync-
adapters/index.html + code sample
 Stackoverflow, use tags below
 [android-syncadapter]
 [sync] + [android]
21
BONUS: CODE SAMPLES
 Repo on GitHub
https://github.com/springbyexample/spring-by-example
 Toy client-server app (both parties supplied )
 Shows all puzzles implemented:
 Accounts – fake one, there is no authentication
 Content Provider based on novoda library
 SyncAdapter logics
 All wrapping XML configuration
 Built via Maven
 Follow README and be happy 
 Got questions?
 a.kaverin@gmail.com
22
Q & A
Thanks for your attention!23

More Related Content

What's hot

Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Apigee | Google Cloud
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
Chris Schalk
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
rajsandhu1989
 

What's hot (20)

Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Google App Engine tutorial
Google App Engine tutorialGoogle App Engine tutorial
Google App Engine tutorial
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Discover Google Firebase Platform
Discover Google Firebase PlatformDiscover Google Firebase Platform
Discover Google Firebase Platform
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest Features
 
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
Essential API Facade Patterns: Synchronous to Asynchronous Conversion (Episod...
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
 
Inside Logic Apps
Inside Logic AppsInside Logic Apps
Inside Logic Apps
 
Cloud Computing Bootcamp On The Google App Engine v1.2.1
Cloud Computing Bootcamp On The Google App Engine v1.2.1Cloud Computing Bootcamp On The Google App Engine v1.2.1
Cloud Computing Bootcamp On The Google App Engine v1.2.1
 
Android dev tips
Android dev tipsAndroid dev tips
Android dev tips
 
Unleash the power of Serverless Computing
Unleash the power of Serverless ComputingUnleash the power of Serverless Computing
Unleash the power of Serverless Computing
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Firebase
FirebaseFirebase
Firebase
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
 
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.ioMuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
 
Google App Engine - Overview #3
Google App Engine - Overview #3Google App Engine - Overview #3
Google App Engine - Overview #3
 
I've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you haveI've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you have
 

Similar to Developing Android Client Apps via SyncAdapter

ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 

Similar to Developing Android Client Apps via SyncAdapter (20)

Campus portal for wireless devices srs
Campus portal for wireless devices srsCampus portal for wireless devices srs
Campus portal for wireless devices srs
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Cloud-native Java EE-volution
Cloud-native Java EE-volutionCloud-native Java EE-volution
Cloud-native Java EE-volution
 
Device APIs at TakeOff Conference
Device APIs at TakeOff ConferenceDevice APIs at TakeOff Conference
Device APIs at TakeOff Conference
 
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - Boston
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
 
OpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology OverviewOpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology Overview
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...
 
Let's talk about the future: state-of-the-art mobile web & hybrid apps
Let's talk about the future: state-of-the-art mobile web & hybrid appsLet's talk about the future: state-of-the-art mobile web & hybrid apps
Let's talk about the future: state-of-the-art mobile web & hybrid apps
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
OSMC 2022 | Current State of icinga by Bernd Erk
OSMC 2022 | Current State of icinga by Bernd ErkOSMC 2022 | Current State of icinga by Bernd Erk
OSMC 2022 | Current State of icinga by Bernd Erk
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Developing Android Client Apps via SyncAdapter

  • 1. DEVELOPING ANDROID CLIENT APPS VIA SYNCADAPTER Anatoliy Kaverin Lohika @ 2013
  • 2. SESSION AGENDA  Why?  SyncAdapter!? LOLWUT?  The big picture  Puzzles  Does anybody use it?  Code samples, documentation  Q&A 2
  • 4. SYNC CACHE: ISSUES TO CONSIDER Are we done?  Global Sync setting  Bandwidth starvation  YES, queued  YES, even duplicates  YES, even if app is off  YES, built in support Hand-made  SyncAdapter framework  Network availability  Pending queue  Refresh on network  Periodic update  YES, manual override  YES! YES! YES! 4
  • 5. SYNCADAPTER!? LOLWUT?  Well, you probably use it everyday… 5
  • 6. THE BIG PICTURE – BASIC FLOW 6
  • 7. THE BIG PICTURE – PUZZLES 7
  • 8. PREREQUISITES TO CONSIDER  Network layer separation  Plain implementation  Sync status field for synced entities  Usually NOOP, Created, Updated & Deleted  Consider the field in UI flows  Consider partial sync  For better performance to sync only local delta 8
  • 9. PUZZLES – ACCOUNT (1)  Key Features  Manage credentials;  Safe system store;  Multitenant support  Sync related  Token caching and invalidation  Alternative flow to login or sign in  Store extra data with account 9
  • 10. PUZZLES – ACCOUNT (2)  Checklist:  Implement Authenticator  Implement Authentication Service  Define configuration in XML 10
  • 11. PUZZLES – ACCOUNT (3)  Checklist:  Register Authentication Service in AndroidManifest  Add permissions  APIs to use:  android.accounts.AccountManager to work with accounts  android.accounts.Account to store credentials 11
  • 12. PUZZLES – CONTENT PROVIDER (1)  Key features  Heart of DAO  Resource effective  Cursor, resource-effective scalability  Power of Joins  Built-in ListView refresh via ContentObserver & Cursor  Sync related  Acts as mediator for sync and UI layers  Supports automatic delta upload sync  NOTE: Can be fake one, but you’ll lose a lot of magic  12
  • 13. PUZZLES – CONTENT PROVIDER (2)  Minimal implementation based on https://github.com/novoda/SQLiteProvider  Supports all CRUD  Supports DB versioning  And even more… 13
  • 14. PUZZLES – SYNCADAPTER (1)  Key features  Plugin to Android SyncManager  SyncManager manages queue of execution  Adapter is executed in background thread & when network is available  Sync related  Scheduling & automated mode  Respects system settings  Can be overridden by manual request  Partial sync supported  Upload only local delta  Any other criteria (Bundle) 14
  • 15. PUZZLES – SYNCADAPTER (2)  Checklist  Implement SyncAdapter class  Implement Sync Service  Define configuration xml 15
  • 16. PUZZLES – SYNCADAPTER (3)  Checklist  Register Sync Service in AndroidManifest  Add permissions  APIs to use  android.content.ContentResolver to reach SyncManager programmatically 16
  • 17. PUZZLES – SYNCADAPTER (4)  How to trigger sync?  Upload delta  ContentResolver.notifyChange  Be aware of cyclic calls if used in ContentProvider  Scheduling  ContentResolver.addPeriodicSync  Automated  ContentResolver.setSyncAutomatically  Manual  ContentResolver.requestSync  Manual forced  ContentResolver.requestSync  Pass SYNC_EXTRAS_MANUAL in bundle 17
  • 18. THE BIG PICTURE – OPTIONAL PUZZLES 18
  • 19. PROS & CONS  Pros  Simplify server interaction  A lot of work handled by framework  Resource effective – the Android way  Cons  A lot of puzzles, hard to start…  Lack of documentation  Error handling  Bugs  19
  • 21. DOCUMENTATION  Official docs  Great tutorial added in August ’13 http://developer.android.com/training/sync- adapters/index.html + code sample  Stackoverflow, use tags below  [android-syncadapter]  [sync] + [android] 21
  • 22. BONUS: CODE SAMPLES  Repo on GitHub https://github.com/springbyexample/spring-by-example  Toy client-server app (both parties supplied )  Shows all puzzles implemented:  Accounts – fake one, there is no authentication  Content Provider based on novoda library  SyncAdapter logics  All wrapping XML configuration  Built via Maven  Follow README and be happy   Got questions?  a.kaverin@gmail.com 22
  • 23. Q & A Thanks for your attention!23

Editor's Notes

  1. Introduction. Ask about Android experience, client-server apps and sync adapter knowledge. Session goal.
  2. Define session format – ask questions on current slide content. Complex & conceptual question – Q&A block.
  3. Persisting in cache – Evernote example;off-line mode - no network; capability to create/delete/edit data offline and changes to be applied when back online
  4. What we need to consider to achieve functionality we just mentioned…Network availability – check net before requestPending queue – gather requests if offline, avoid duplicated requests to save battery, like several refreshes, or some upload requests;
  5. Rotation symbol near wifi in HTC Sense;Accounts; Configuration for Google services; Multiple accounts!
  6. Basic flow suggested by the framework; All UI works only with Content Provider; Sync Adapter works with CP;
  7. Let’s see the same picture, but mentioning puzzles we’ll have to implement – 3 items;
  8. Network will be used in 3 places – Login activity, Authenticator – token routines, SyncAdapter network operations;You logic should allow to separate upload from download, as well as an option – to separate synced entities. For example: facebook, sync news, but not contacts at the same time;
  9. How you usually store your app credentials? Prefs or DB? Prefs fine till you got multiple accounts; both pretty safe;Account can have username, password and extra data associated;
  10. Only 2 classes, 1 is almost a dumbstub
  11. Usually CP are avoided, I’m not sure why? ORM fashion?Cursor – allows Android to manage window + fetch exact fields and not whole entity; avoid Cursor to entity mapping when not needed;Joins can allow to do effective cross entity fetch;
  12. DB versioning based on sql file names;
  13. All you code is executed when network is on – but you should be aware that it can be interrupted; Use Sync status to allow repeatable requests;Schedule time intervals, not exact time; intervals may vary;
  14. 2 classes, service – is almost a stub; but it is advised to make creation of syncadapter thread safeisAlwaysSyncable – important to make sure it is synced when network available;
  15. notifyChange is usually used from Content Provider;
  16. If you have existing app – it may be wise to drop some of components;Account and ContentProvider can be implemented as stubs; but they must be registered;
  17. Simple – no need to manage threading, define IntentServices, thing of UI callbacks, etc.Framework provides - network check, queue, duplicated requests, etc;Resource – global queue, no channel starvation;Error handling, hard & soft errorsBugs – invalidate tokens; some sync flags ignored. When it works – it’s stable;
  18. Any.do – switched a month ago; Evernote – in June-July.
  19. Stackoverflow compensates lack of docs;