Hi, I managed to solve the issue. I have all those permissions. I just added a Thread.sleep(1000) before doing the sending of messages and it works now.
Regards, Perumal On Sep 22, 5:39 pm, KANTESH BABANNAVAR <[email protected]> wrote: > probably these? > <uses-permission android:name="android.permission.SEND_SMS" /> > <uses-permission android:name="android.permission.RECEIVE_SMS" /> > > On Sep 22, 8:37 am, perumal316 <[email protected]> wrote: > > > > > Hi All, > > > I have written an application to read all incoming SMS and if the SMS > > contains certain string, I will also send a copy of the message to my > > another phone for backup purposes. > > > I used the reference from the following website: > > >http://www.anddev.org/novice-tutorials-f8/recognize-react-on-incoming... > > > It uses BroadcastReceiver to get the incoming SMS, but when I tried to > > send it using the following method: > > > private void sendingSMS(String phoneNo,String message){ > > > SmsManager sms = SmsManager.getDefault(); > > sms.sendTextMessage(phoneNo, null, message,null,null); > > > } > > > It always crashes. Any idea how to resolve it? Is it because of using > > BroadcastReceiver. > > > Thanks In Advance, > > Perumal- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

