是否有Android的开源电话目录应用程序或我如何自己制作?
答案 0 :(得分:1)
您可以使用设备的目录。 通过该课程,您可以检索电话的联系人:
public class Repository extends Activity { /** Called when the activity is first created. */ private static final int PICK_CONTACT = 0; Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.Repo); startActivityForResult(intent, PICK_CONTACT); } }
不要忘记在Manifest中添加权限:
uses-permission android:name="android.permission.READ_CONTACTS"
我希望这会对你有所帮助 迈克尔