I register receiver like that in my activity class registerReceiver(sendreceiver, new IntentFilter(SMS_SENT));
private BroadcastReceiver sendreceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String info = "Send information: "; switch(getResultCode()) { case Activity.RESULT_OK: info += "send successful"; break; case SmsManager.RESULT_ERROR_GENERIC_FAILURE: info += "send failed, generic failure"; break; case SmsManager.RESULT_ERROR_NO_SERVICE: info += "send failed, no service"; break; case SmsManager.RESULT_ERROR_NULL_PDU: info += "send failed, null pdu"; break; case SmsManager.RESULT_ERROR_RADIO_OFF: info += "send failed, radio is off"; break; } Toast.makeText(getBaseContext(), info, Toast.LENGTH_SHORT).show(); } }; and in receiver class in which i am extending broadcastReceiver I am getting the action and switch to activity class But my receiver is not registering. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en