android how to store sentmessage to sent/outbox

125 Views Asked by At

My app is SMS app. Its have 3 activity “new message”, “inbox” ,“outbox” I got problem at “outbox activity”

Its able to send message, but “sent message" can't store/save in outbox message.

Activity_send.java

package com.meawflat;

public class SendSMS extends 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();
                }

        }
    });


}

helps me advance :'(

0

There are 0 best solutions below