Sum*_*rma 3 android android-contacts
如何以编程方式在Android中列出SIM卡联系人?我得到了代码来获取手机联系人,但我也需要SIM卡联系人.
Uri simUri = Uri.parse("content://icc/adn");
Cursor cursorSim = this.getContentResolver().query(simUri, null, null,null, null);
while (cursorSim.moveToNext()) {
listName.add(cursorSim.getString(cursorSim.getColumnIndex("name")));
listContactId.add(cursorSim.getString(cursorSim.getColumnIndex("_id")));
listMobileNo.add(cursorSim.getString(cursorSim.getColumnIndex("number")));
}
Run Code Online (Sandbox Code Playgroud)
只是现在按照代码获取simcard详细信息..它工作正常
| 归档时间: |
|
| 查看次数: |
8071 次 |
| 最近记录: |