自动添加帐户 [英] Add account automatically
问题描述
我的应用程序需要从服务器同步的一些数据。我添加必要的类(类似于SampleSyncAdapter)现在我可以通过设置/同步和帐户添加帐户。 但我想已经添加了我的帐户,并安装应用程序后,刚工作同步(我不希望用户做任何设置手动更改)。如何做到这一点?
My application needs to synchronize some data from server. I added necessary classes (similarly to SampleSyncAdapter) now I can add account via "Settings/Sync and Accounts". But I want to have already added my account and working synchronization just after application is installed (I do not want user to do any manual changes in settings). How to do this?
推荐答案
目前的Android AtLeap库,它包含辅助类使用的帐户身份验证。看一看它 https://github.com/blandware/android-atleap
There is Android AtLeap library which contains helper classes to use Account Authenticator. Have a look at it https://github.com/blandware/android-atleap
这篇关于自动添加帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!