常规同步设置“自动同步"以编程方式复选框 [英] general sync settings "auto-sync" checkbox programmatically

查看:94
本文介绍了常规同步设置“自动同步"以编程方式复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种启用/禁用常规同步设置"中的自动同步"复选框的方法.

I am looking for a way to enable/disable the "auto-sync" checkbox in the "general sync settings".

Afair库存功率控制小部件也具有此功能.如果这个小部件可以,我也应该有解决方案,对不对?请大家帮帮我,我急切地在网上寻找解决方案,但没有成功.

Afair the stock power control widget has this feature too. If this widget can do, there should be a solution for me too, right? Please guys help me out, I am desperately looking for a solution on the web with no success.

此操作是否可能需要用户交互?我知道我可以发送一个意图来打开同步视图",但这不是我的意图!

Is it possible that a user interaction is mandatory for this operation? I know I can send an Intent to open the Sync View but this is not my intention!

我没有在此论坛中找到类似的特定帐户的同步设置

I am not looking for the sync settings for a specific account as I found in this forum like

ContentResolver.setSyncAutomatically(Account account, String authority, boolean sync);

推荐答案

我正在寻找一种启用/禁用常规同步设置"中的自动同步"复选框的方法.

I am looking for a way to enable/disable the "auto-sync" checkbox in the "general sync settings".

更新

ContentResolver上尝试setMasterSyncAutomatically().

这篇关于常规同步设置“自动同步"以编程方式复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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