我的应用是短信应用。 它有3个活动“新消息”,“收件箱”,“发件箱” 我在“发件箱活动”中遇到了问题
它能够发送消息,但“已发送消息"无法存储/保存在发件箱消息中。
Activity_send.java
package com.meawflat;
public class SendSMS扩展了Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_send_sms);
final EditText edtPhone = (EditText) findViewById(R.id.edtNoPhone);
final EditText edtMessage =(EditText) findViewById(R.id.edtMessage);
final Button btnSend = (Button) findViewById(R.id.btnSend);
final TextView txtChiper = (TextView) findViewById(R.id.txtChiper);
final EditText edtKey= (EditText) findViewById(R.id.edtKey);
btnSend.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
String PhoneNo = edtPhone.getText().toString();
String Message = edtMessage.getText().toString();
String strKey=edtKey.getText().toString().trim();
String chiperText= Encript.encription(Message, strKey);
if(noPhoneNo.length()>0){
sendSMS(phoneNo, chiperText);
txtChiper.setText(chiperText);
}else {
Toast.makeText(getBaseContext(), "insert phone number first", Toast.LENGTH_LONG).show();
}
}
});
}
帮助我前进:'(