Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:25:25+00:00 2026-06-08T08:25:25+00:00

I am trying to figure out how to send sms from my application. I

  • 0

I am trying to figure out how to send sms from my application. I have tried the following:

try { 
    String newNumber, newMessage;
    newNumber = number.getText().toString();
    newMessage = message.getText().toString();
    smsManager.getDefault();
    smsManager.sendTextMessage(newNumber, null, newMessage,null, null);

    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
     }  
    }
}
    };thread.start();

But I get a log cat with this:

07-23 09:03:42.378: I/Process(14426): Sending signal. PID: 14426 SIG:
9 07-23 09:06:18.972: W/dalvikvm(14529): threadid=11: thread exiting
with uncaught exception (group=0x40a381f8) 07-23 09:06:18.972:
E/AndroidRuntime(14529): FATAL EXCEPTION: Thread-885 07-23
09:06:18.972: E/AndroidRuntime(14529): java.lang.NullPointerException
07-23 09:06:18.972: E/AndroidRuntime(14529): at
com.johnnydicamillo.sms.SmsSpammerActivity$1.run(SmsSpammerActivity.java:48)
07-23 09:06:19.238: W/IInputConnectionWrapper(14529): showStatusIcon
on inactive InputConnection 07-23 09:06:44.855: I/Process(14529):
Sending signal. PID: 14529 SIG: 9

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:25:26+00:00Added an answer on June 8, 2026 at 8:25 am

    It looks like smsManager may be null, getDefault() is a static method used to get the default instance of an SmsManager and it doesn’t show that you are setting anything. You probably want that line to be something like:

    SmsManager smsManager = SmsManager.getDefault();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how to send a variable from the controller's view
I am trying to figure out the best way to send emails from an
I've been trying to figure out how to send JMS messages from Ruby. I've
I'm trying to figure out how to properly serialize my XmlDocument and send it
trying to figure out why this is happening - I have an input text
I've been banging my head trying to figure out how to send a post
I'm trying to figure out how some apps send images attached to text messages.
i'm trying to figure out where Windows Error Reports are saved; i hit Send
I'm having bit of a trouble trying to figure out how I would send
I am trying to figure out how to retrieve data from a MySQL database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.