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、ラベルを取得したい。
たとえば、新しい連絡先を作成するときは、アカウントの種類を正確にする必要があります。そのためには、連絡先の同期を有効にするアカウントの1つ、つまり「電話」の種類を選択できます。
AccountManager、ContactsContract.Settings、およびSyncAdapterTypeを検索しましたが、このラベルが見つかりません。
どうもありがとう
次のクラスが私の質問に答えるようです:
AccountManager AuthenticatorDescription
私は(最終的に)AndroidサンプルのContactManagerサンプルでそれらを見つけました。
しかし、本当の答えは、PackageManager を介してラベルを取得することです。これはサンプルで説明されています。