第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何將多個短信發(fā)送到一個號碼

如何將多個短信發(fā)送到一個號碼

尚方寶劍之說 2020-02-03 13:00:34
主要活動代碼public class MainActivity extends Activity implements OnItemClickListener, OnClickListener{Button send;ListView listViewSMS;Cursor cursor;SMSListAdapter smsListAdapter;Context context;ArrayAdapter<SMSListModel> adapter;List<SMSListModel> list = new ArrayList<SMSListModel>();TextView textViewSMSSender, textViewSMSBody;int i;int count = 0;@Overrideprotected void onCreate(Bundle savedInstanceState) {    super.onCreate(savedInstanceState);    setContentView(R.layout.activity_main);    context=this;    listViewSMS=(ListView)findViewById(R.id.lvSMS);    send = (Button)findViewById(R.id.send);    send = (Button)findViewById(R.id.send);    textViewSMSSender=(TextView)findViewById(R.id.tvSMSSend);    textViewSMSBody=(TextView)findViewById(R.id.tvSMSBody);    cursor = getContentResolver().query(Uri.parse("content://sms/inbox"), null, null, null, null);    smsListAdapter = new SMSListAdapter(this,getModel());    listViewSMS.setAdapter(smsListAdapter);    listViewSMS.setOnItemClickListener(this);}@Overridepublic void onItemClick(AdapterView<?> arg0, View v, int arg2, long arg3) {    TextView label = (TextView) v.getTag(R.id.tvSMSSend);    CheckBox checkbox = (CheckBox) v.getTag(R.id.cbSelect);    Toast.makeText(v.getContext(), label.getText().toString()+" "+isCheckedOrNot(checkbox), Toast.LENGTH_LONG).show();      }private String isCheckedOrNot(CheckBox checkbox) {    if(checkbox.isChecked())        return "is checked";    else        return "is not checked";}private List<SMSListModel> getModel() {    if(cursor.getCount()>0){        for(i=0;i<cursor.getCount();i++){            if(cursor.moveToPosition(i)){                list.add(new SMSListModel(cursor.getString(cursor.getColumnIndex("address")),cursor.getString(cursor.getColumnIndex("body"))));            }        }    }    return list;}我想使用復選框選擇發(fā)送多個短信。僅將選定短信的內(nèi)容(即它們的主體)作為新的消息主體發(fā)送到已預定義的#121,但是上述代碼在執(zhí)行選擇后將完整的收件箱消息(無論是否選中)發(fā)送到121。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 818 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號