可能获得“所有者"Android 中的联系信息? [英] Possible to get "Owner" contact info in Android?
本文介绍了可能获得“所有者"Android 中的联系信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直无法找到直接的答案.谁能告诉我是否可以在 Android 应用中获取手机所有者的联系信息?
I haven't been able to find a straight answer on this. Can anyone tell me if it's possible to get the contact info of the phone's owner in an Android App?
推荐答案
所以答案在技术上是否定的.到目前为止,我发现获取所有者数据的唯一方法是通过客户经理.以下是如何使用它的示例:
So the answer is technically no. The only way I've found so far to get owner's data is through the account manager. Here's an example of how to use it:
final AccountManager manager = AccountManager.get(this);
final Account[] accounts = manager.getAccountsByType("com.google");
final int size = accounts.length;
String[] names = new String[size];
for (int i = 0; i < size; i++) {
names[i] = accounts[i].name;
}
有关详细信息,请参阅:http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager
For more info see: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager
这篇关于可能获得“所有者"Android 中的联系信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文