Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8762981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:40:29+00:00 2026-06-13T15:40:29+00:00

I want to synchronise a local Android database with a remote database on a

  • 0

I want to synchronise a local Android database with a remote database on a server somewhere. For now, I want to do this via a REST API with basic HTTP authentication.

I have done some reading and watched the Google I/O 2010 “Developing Android REST Client Applications” video, however I am still a little confused as to which approach will be most suitable for me:

1.) Content Provider + Service

2.) Content Provider + SyncAdapter

3.) Something else?

I have already written a Content Provider. I am a bit confused about the SyncAdapter and how authentication works – can I used basic HTTP authentication with a SyncAdapter?.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:40:31+00:00Added an answer on June 13, 2026 at 3:40 pm

    Authentication is done with accounts in Android. Have a look at this class: https://developer.android.com/reference/android/accounts/AbstractAccountAuthenticator.html

    Also have a look at this blog post:
    http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/

    Regarding which approach to choose: If you want to sync between a remote DB and a local DB (that is you really want to sync and not only download content) a sync adapter is always the best choice!

    If you have downloaded Android’s samples you should also dig into the SampleSyncAdapter project. This should get you started.

    BTW: Never ever do Basic HTTP authentication. This is not encrypted and all communication between your server and the app is readable to all. Always use TLS (SSL) instead!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm develloping an android application that has a local database which synchronizes whith an
I have a trackbar on Windows form. I want to synchronise the trackbar movement
i am trying this code .i jst want to save the value to NSUserDefault,trying
I want to create a project in which it is required to synchronize local
I am still not clear in this: I want to fetch code from opensource
I have a saved SQLCompare project which I use to synchronize my local database
I am working on a pre-existing MS SQL Server database that was not designed
I have remote svn repository. I want to check-out it (with history) and then
I want to synchronise my collection each time an item is added. So if
I'm using WinSCP to interact with a remote server that supports only SFTP and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.