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 7417877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:46:58+00:00 2026-05-29T07:46:58+00:00

i am a totally new guy around here and i dont know whether its

  • 0

i am a totally new guy around here and i dont know whether its the right place to ask my silly doubts…but please help me guys…i coded a simple sms sending programe and its showing runtime errror..i dont knw how to debug it..plz help

    package com.smsProject;
    import android.app.Activity;
    import android.os.Bundle;
    import android.telephony.SmsManager;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.Button;
    import android.widget.EditText;
    public class SmsProjectActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */




    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);



        buttonSend=(Button)findViewById(R.id.send);
        buttonSend.setOnClickListener(this);



    }

    @Override
    public void onClick(View arg0) {
        // TODO Auto-generated method stub
     String msg=editTextmessage.getText().toString();
     String num=editTextnumber.getText().toString();
     SmsManager sms=SmsManager.getDefault();
     sms.sendTextMessage(num,null, msg,null,null);

     editTextmessage.setText("");
     editTextnumber.setText("");

    }
} 

my main.xml file is

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" android:background="@drawable/jibin">

    <EditText
        android:id="@+id/msg"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" android:hint="Enter the message">

        <requestFocus />
    </EditText>

    <EditText
        android:id="@+id/num"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="text|textPersonName" android:hint="Enter a  number"/>

    <Button
        android:id="@+id/send"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Send" />

</LinearLayout>

my exception catlog is

    01-31 20:40:43.587: W/dalvikvm(1593): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-31 20:40:43.607: E/AndroidRuntime(1593): FATAL EXCEPTION: main
01-31 20:40:43.607: E/AndroidRuntime(1593): java.lang.NullPointerException
01-31 20:40:47.936: W/InputManagerService(71): Got RemoteException sending setActive(false) notification to pid 1593 uid 10038
01-31 20:43:45.129: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 20:48:45.130: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 20:49:43.546: W/dalvikvm(1638): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-31 20:49:43.556: E/AndroidRuntime(1638): FATAL EXCEPTION: main
01-31 20:49:43.556: E/AndroidRuntime(1638): java.lang.NullPointerException
01-31 20:49:47.227: W/InputManagerService(71): Got RemoteException sending setActive(false) notification to pid 1638 uid 10038
01-31 20:53:45.137: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 20:58:45.151: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:03:45.156: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:08:45.167: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:13:45.177: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:18:45.178: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:23:45.187: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:28:45.187: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:33:45.196: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:38:45.199: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:43:45.207: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:48:45.211: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
01-31 21:52:31.657: W/dalvikvm(1758): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-31 21:52:31.667: E/AndroidRuntime(1758): FATAL EXCEPTION: main
01-31 21:52:31.667: E/AndroidRuntime(1758): java.lang.NullPointerException
01-31 21:53:45.216: D/SntpClient(71): request time failed: java.net.SocketException: Address family not supported by protocol
  • 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-05-29T07:46:59+00:00Added an answer on May 29, 2026 at 7:46 am

    Please post the runtime exception from logcat. Hard to say without that, but my guess is that you haven’t requested the appropriate permissions, try adding this to the top-level manifest node of your manifest xml file:

    <uses-permission android:name="android.permission.SEND_SMS" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm totally new to both java and java Server worlds... But I've a good
I'm totally new to GreaseMonkey, but I'm trying to make a little script. //
I'm totally new to django, and I'm using its documentation to get help on
I'm totally new to Ruby but not to programming. All I did was going
I am totally new to programming and to some new technologies. Right now I
im totally new to rails. here my question: i made an app with articles
I'm totally new to iOS programing (I'm more an Android guy..) and have to
I am totally new to drupal and have googled my self silly without finding
hi i am a totally new guy on JAVA OO concepts ,and this is
Totally new to Spring & Java development but working on a project for a

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.