android studio开发怎么获取手机短信

2025-04-14 15:35:20
推荐回答(1个)
回答1:

1.点击一个按钮就会显示系统的联系人列表,当用户点击联系人之后就会看到详细的名字和电话。
2.具体的代码如下:首先在AndroidManifest.xml文件中配置用户权限。
11

activity_main.xml

xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.dragon.testevent.MainActivity">