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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:04:46+00:00 2026-06-13T12:04:46+00:00

I’m trying to build a program that reads SMS from a specific sender. It

  • 0

I’m trying to build a program that reads SMS from a specific sender. It then parses the text into an address. A popup comes up automatically with the address and two buttons, OK (cancels the popup) and Map (send the address to a MapView showing the address). I don’t know how to create a popup that shows the time, address, and calltype.

package bkgdService;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.widget.Toast;

public class SMSReceiver extends BroadcastReceiver
{
public int calltypeIndexA;
private String time;
private String callType;
private String location;

public void onReceive(Context context, Intent intent)
{
    Bundle myBundle = intent.getExtras();
    SmsMessage [] messages = null;

    if (myBundle != null)
    {
        Object [] pdus = (Object[]) myBundle.get("pdus");
        messages = new SmsMessage[pdus.length];

        for (int i = 0; i < messages.length; i++)
        {

        if (messages[i].getOriginatingAddress() == "messaging@iamresponding.com") 
            {

                messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
                String message = messages[i].getMessageBody();
                this.time = SupportMethods.findTime(message);
                this.callType = SupportMethods.findCallType(message);

                }
            }

        //ADD POPUP
    }
}

}

  • 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-13T12:04:47+00:00Added an answer on June 13, 2026 at 12:04 pm

    Yes, many of them can be quite confusing. I will see if I can help. If your app isn’t going to be very robust, you can make the alert right there. If you think it will get much bigger, I would suggest creating a separate class for your alerts/popups and pass the data through intents link Here is a link in the docs that explains real well how to create a custom alert link. You can use this to create a custom alert to pop-up. You can either declare your message, date, etc., variables at the beginning of your application where you have your others then use them in your alert as TextViews to display in the alert. Or as I said, you may want to consider creating a separate class for them if you will have more alerts throughout your program. Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I'm trying to create an if statement in PHP that prevents a single post
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.