Android: how to access the SIM contact table using the SDK?

后端 未结 3 1734
梦谈多话
梦谈多话 2020-12-18 06:04

I am trying to use this query to read the contacts on the SIM.

            cur = managedQuery(Uri.parse(\"content://icc/adn\")
                ,null
                 


        
3条回答
  •  再見小時候
    2020-12-18 07:00

    i got it,

    String simUrl = "content://icc/adn";
    Intent intent = new Intent();
                Log.d(TAG, "simUrl=" + simUrl);
                intent.setData(Uri.parse(simUrl));
                Uri uri = intent.getData();
                Cursor mCursor = context.getContentResolver().query(uri, null,
                        null, null, null);
    

    and then, for(...){...}, you know

提交回复
热议问题