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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:34:15+00:00 2026-06-11T06:34:15+00:00

Following most people I guess, I am deriving my SMS handling code from http://mobiforge.com/developing/story/sms-messaging-android

  • 0

Following most people I guess, I am deriving my SMS handling code from http://mobiforge.com/developing/story/sms-messaging-android. I am trying to catch the broadcasts for sent and delivered messages, with this code (for sent messages):

        appContext.registerReceiver(new BroadcastReceiver() {
            @Override
            public void onReceive(Context arg0, Intent arg1) {
                Log.i("Debug",
                        "My embedded receiver: "
                                + String.valueOf(getResultCode()));
            }
        }, new IntentFilter("iam.applications.SmsReceiver.SMS_SENT"));

This always results in getResultCode() returning a value of -1, even when the SMS is successfully sent. I don’t know of another way to tell whether my SMS was sent or not.

I have also subclassed BroadcastReceiver to see if that makes any difference, but it does not. -1 is always returned:

@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();

    Log.i("Debug",
            "Result code in onReceive: " + String.valueOf(getResultCode()));
}

My creation of the PendingIntent looks like this (snippet from a for-loop for processing parts of long SMS messages):

        Intent sentIntent = new Intent(
                "iam.applications.SmsReceiver.SMS_SENT");
        sentIntent.putExtra(SmsHandler.PHONE_NUMBER, phoneNumber);
        sentIntent.putExtra(SmsHandler.MESSAGE, message);
        sentPIArray.add(PendingIntent.getBroadcast(appContext,
                (int) Calendar.getInstance().getTimeInMillis(), sentIntent,
                PendingIntent.FLAG_UPDATE_CURRENT));
  • 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-11T06:34:17+00:00Added an answer on June 11, 2026 at 6:34 am

    I’m a big idiot:

    // Field descriptor #14 I
    public static final int RESULT_OK = -1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code works fine in most browsers but it won't work in Internet
I have a following code in a most inner loop of my program struct
Which of the following code snippets is the most pythonic? The calculation is trivial
I'm having problems with the following code (I am a beginner in most things
Most people are asking about migrating from J2ME to Android. I'm not. I'd like
I have the following code: public IList<Reference.Grid> GetGrid(string pk) { return ( from d
Most of you probably know the following problem: You edit an HTML, view the
In most pieces of pseudocode, I usually find the following: DeleteMin (Return the element
I'm looking for the most succinct solution to the following problem in JavaScript: I
What is the most idiomatic way to do the following? def xstr(s): if s

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.