Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取与 android 帐户关联的显示名称、id 标签。
例如,当您创建一个新联系人时,您必须确定帐户的类型,为此,您可以选择启用联系人同步的帐户之一,或“电话”类型。
我通过 AccountManager、ContactsContract.Settings 和 SyncAdapterType 进行了搜索,但找不到此标签。
多谢
似乎以下课程回答了我的问题:
AccountManager 身份验证器说明
我(最终)在 android 示例的 ContactManager 示例中找到了它们。
但真正的答案是通过 PackageManager 获取标签。这在示例中进行了解释。