0. Read the docs:
http://developer.android.com/reference/android/telephony/gsm/SmsManager.html
1. Check the official example:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/index.html
2.Set the second argument to null in
  sms.sendTextMessage(phoneNumber, " ", msg, sentPI, deliveredPI);3.
Be sure that "msg" is not empty. (TextUtils.isEmpty is helpfull)
4. Be sure you have the "android.permission.SEND_SMS" permission
4. How would you like to unregister that broadcast receiver?
5. Improve your skills

Yeah and you can not live without logcat in the android world:
http://developer.android.com/guide/developing/tools/logcat.html

On 29 November 2011 11:00, Rocky <rkjhaw1...@gmail.com> wrote:
> Provide the logcat/error.
>
>
> On Tue, Nov 29, 2011 at 3:18 PM, Ali Chousein <ali.chous...@gmail.com>
> wrote:
>>
>> Check your logcat. It'll give you very good log information where
>> exactly (e.g. on which exact line) you are getting the null pointer
>> exception.
>>
>> -------------------------------------------------
>> Ali Chousein
>> Weather-Buddy
>> http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
>> Geo-Filtered Assistant
>> http://geo-filtered-assistant.blogspot.com
>> https://marketplace.cisco.com/apphq/store/products/994
>>
>> --
>> 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
>
>
>
>
> --
> Thanks & Regards
>
> Rakesh Kumar Jha
> Android Developer, Trainer and Mentor
> Bangalore
> (O) +918030274295
> (R) +919886336619
>
>
> --
> 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

-- 
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

Reply via email to