Substituir aplicativo de mensagens Android padrão

Desejo substituir o aplicativo de mensagens padrão do Android. Se eu receber um sms ou mms, quero enviá-lo por e-mail, mas não quero nenhuma notificação por telefone. Então, basicamente, quero substituir o aplicativo de mensagens padrão.

Como posso tornar meu aplicativo o padrão que recebe os sms?

Muito obrigado. É exatamente disso que eu preciso. Mas tenho mais um problema. Usei o receptor para receber a mensagem ... mas não sei como encontrar a mensagem no telefone e marcá-la como lida.

public void onReceive(Context context, Intent intent) {
    // TODO Auto-generated method stub
    //---get the SMS message passed in---
    Bundle bundle = intent.getExtras();        
    SmsMessage[] msgs = null;
    String str = "";            
    if (bundle != null)
    {
        //---retrieve the SMS message received---
        Object[] pdus = (Object[]) bundle.get("pdus");
        msgs = new SmsMessage[pdus.length];            
        for (int i=0; i<msgs.length; i++){
            msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);                
            str += "SMS from " + msgs[i].getOriginatingAddress();                     
            str += " :";
            str += msgs[i].getMessageBody().toString();
            str += "\n";        
        }
        //---display the new SMS message---
        Toast.makeText(context, str, Toast.LENGTH_SHORT).show();

        //---find and mark the messages as read---
        Uri uriSms = Uri.parse("content://sms/inbox/");
       try{
        Cursor c = context.getContentResolver().query(uriSms, null,null,null,null);
            //---code to find the message by body and sender---
            ...

    }

Existe alguma maneira de identificar a mensagem como um ID? Agora, encontro a mensagem comparando o número do bofy e do remetente de todas as mensagens na caixa de entrada.

Obrigado, Radu

questionAnswers(3)

yourAnswerToTheQuestion