私は誰も私がこの中に私のミスを知らせることができ電話番号からIDを取得するにはどうすればよいですか?
String addrWhere = Contacts.Phones.NUMBER + " = " + userNumber;
String id = "";
Cursor c = mContext.getContentResolver().query(
Contacts.Phones.CONTENT_URI,
new String[] { Contacts.Phones._ID }, addrWhere, null, null);
try {
if (c.getCount() > 0) {
c.moveToFirst();
id = c.getString(0);
Log.i("IDS", id);
}
} finally {
c.close();
}
return id;
を使用して、したがって電話番号を取得しようとしていますか?
(* *リンクが含ま確かに、しかし*も*引用)関連ビットだけではなく、リンクをお伝えください。http://meta.stackexchange.com/questions/8231/are-answers-that-他の場所 - 本当に良い答え –
私は私の答えを編集しました。 – stpn108