Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
804 views
in Technique[技术] by (71.8m points)

synchronization - Put your app account in Auto-Sync settings android

I am new on this so i do not find the answer on the internet or i am not sure if the answer is that. What i am trying to do is to make my app sync all the contacts in the native contact app like whatsapp or facebook does. I also wanted to link contacts. Any hint or tutorial would be great.

Something like this: enter image description here

What are the benefits of putting my app over there? I am very new on this. Please I hope an answer do not vote down D:. Any answer is welcome.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Account Manager requires several key api's to work with your app.

Just to show your App account

  • Authenticator Activtiy which extends AbstractAccountAuthenticator
  • Service Activity which Bind's with Authenticator
  • An xml file in RES/XML folder
  • Some Settings in Android Manifest.

Read this https://www.finalconcept.com.au/article/view/android-account-manager-step-by-step

To Auto Sync your Account;

  • SyncAdapter Class which extends AbstractThreadedSyncAdapter
  • SyncService which extends Service
  • an xml file , which defines metadata for SyncAdapter
  • Permission in Android Manifest
  • Optionally Content Provider Class

Offical Android Developer Tutorial https://developer.android.com/training/sync-adapters/index.html

Another Fully Detailed answer (With Examples) : Android Login - Account Authenticator vs Manual Authentication


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...