Smsmanager class to know if you really sent the text

Asked

Viewed 108 times

0

I use the Smsmanager class to text in my app like this

smsManager.sendMultipartTextMessage (telefones.get(i), null, smsManager.divideMessage(men), enviados, entregues);

there’s this part of the code here that returns whether you can send it or not

context.registerReceiver(new BroadcastReceiver(){
    @Override
    public void onReceive(Context context, Intent arg1) {
        switch (getResultCode())
        {
            case Activity.RESULT_OK:
                j++;
                Toast.makeText(context, j + " SMSs enviados", 
                        Toast.LENGTH_SHORT).show();

                break;
            case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
                Toast.makeText(context, "Falha Geral", 
                        Toast.LENGTH_SHORT).show();
                break;
            case SmsManager.RESULT_ERROR_NO_SERVICE:
                Toast.makeText(context, "Sem serviço", 
                        Toast.LENGTH_SHORT).show();
                break;
            case SmsManager.RESULT_ERROR_NULL_PDU:
                Toast.makeText(context, "Null PDU", 
                        Toast.LENGTH_SHORT).show();
                break;
            case SmsManager.RESULT_ERROR_RADIO_OFF:
                Toast.makeText(context, "Radio desligado", 
                        Toast.LENGTH_SHORT).show();
                break;
        }
    }

}, new IntentFilter(SENT));

was wanting to pass the phones together with the sent Internet , someone knows how to do this?

  • There is no way, for this, the recipient should send an answer, and this does not happen.

  • there is a reason why I found it right here on the forum http://stackoverflow.com/questions/14137836/trouble-with-sendmultiparttext-in-android but I didn’t quite understand how and

  • 1

    Face this talking nonsense, this link q sent has nothing to do with your question

  • I was told it had to do with guilt and not with me

  • more when you send normal text by mobile , when the text arrives on the person’s mobile phone you receive a notification

  • Ilgner, even if the "fault" is not yours, you are responsible for all the information you put here. This kind of attitude does not help to get answers, ok?

  • Another thing: confirmation is possible, in at least some cases. There is one question in the OS about this, answered: http://stackoverflow.com/questions/4639778/how-to-monitor-each-of-sent-sms-status/4640066

  • @Renan the link content you sent and the same from the link I sent and Antony said I was talking nonsense :/

  • @Ilgnerdeoliveira this shows two things: 1-) you have not read what is in the links, because they are two completely different questions and 2-) or Antony has not seen the question and the answer in the link I sent, or he has already tested the solution that is there (even without seeing the answer) and you’ve come to the conclusion that it doesn’t work. You at least tried to follow what you say this answer?

  • I know it’s two different questions , more she talks about catching this kind of feedback , I tried more gave her an error saying that registerReceiver does not exist

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.