2014-09-20 106 views
0

我想做一个应用程序,用户可以存储一些数据在sqlite,他/她可以稍后查看一个listview。当用户点击列表视图项目,打开联系人列表,选择联系人,并发送带有列表视图项目数据的短信

这是我的应用程序的第一部分。 第二部分是当用户点击一个listviewitem时,通过短信发送该列表视图项的信息。

我该如何做到这一点?用户可以选择他/她想要发送的联系人吗?

+0

这可以帮助您:http://developer.android.com/training/contacts-provider/index.html – joao2fast4u 2014-09-20 18:27:56

回答

0

我分享你我都用来做这些事情希望它有助于 在数据库 存放链接:http://www.tutorialspoint.com/android/android_sqlite_database.htm

用于发送短信:

Intent smsIntent = new Intent(Intent.ACTION_VIEW); 
      smsIntent.setType("vnd.android-dir/mms-sms"); 
      smsIntent.putExtra("address", "type phone number..."); 
      smsIntent.putExtra("sms_body","your message..."); 
      startActivity(smsIntent); 

来实现这一目标列表项点击请按照下列步骤操作: http://www.vogella.com/tutorials/AndroidListView/article.html

供用户选择多个联系人使用listView和复选框: http://www.mysamplecode.com/2012/07/android-listview-checkbox-example.html