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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:15:18+00:00 2026-06-09T19:15:18+00:00

I am working on a sms application. in my App I have to list

  • 0

I am working on a sms application. in my App I have to list all the convrsation .SO i use the following Uri.

content://mms-sms/conversations/

Its working fine.And the following is my code snippet.

 Uri uri = Uri.parse("content://mms-sms/conversations/");
 Cursor c= getContentResolver().query(uri, null, null ,null,null);
 startManagingCursor(c);
 if(c.moveToFirst()){

            for(int i=0;i<c.getCount();i++){
                     body[i]= c.getString(c.getColumnIndexOrThrow("body")).toString();
                     number[i]=c.getString(c.getColumnIndexOrThrow("address")).toString();
                     c.moveToNext();
             }
    }
    c.close();

    for (int i = 0; i < body.length; i++) {
        System.out.println("body ="+body[i]);
        System.out.println("number ="+number[i]);
    }

The number prints each conversations number and body prints the each conversations last message. But i want to get each conversations whole message and also help me to conversation for a specific number.

  • 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-09T19:15:20+00:00Added an answer on June 9, 2026 at 7:15 pm

    From Conversationscursor, You can get thread_id. Once you got thread_id, continue query from sms provider to return all message which has the same thread_id

    Example : thread_id = 2

    Uri SMS_INBOX = Uri.parse("content://sms");
    Cursor c = getContentResolver().query(SMS_INBOX, null, "thread_id" + " = "
                    + "2", null,
                    "date" + " ASC");
    
    
    while (c.moveToNext()){
    
            Log.v("BODY", c.getString(11).toString()); // 11 is the index of body with project URI
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an ANdroid application.In my app I have to list all
I have been working on an app to respond to received SMS messages (before
I am working on a android application which read the sms from content provider.
I m working on application in which i have to send all contacts from
I am working on sms application in android in which user have to input
I am working on an android sms application.I have to send sms to multiple
Basically I have a working application that sends an SMS after receiving an SMS.
I'm working on an app in that I have to fetch all call and
I have a project I'm working on that requires our WPF application read SMS
i have been working on an sms application and i want to provide some

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.