自动添加帐号 [英] Add account automatically

查看:57
本文介绍了自动添加帐号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要从服务器同步一些数据.我添加了必要的类(类似于 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 库包含使用 Account Authenticator 的辅助类.看看它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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆