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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:09:56+00:00 2026-06-11T18:09:56+00:00

This is actually two questions: If i expose my SQLite as a ContentProvider in

  • 0

This is actually two questions:

  1. If i expose my SQLite as a ContentProvider in my application it will work in an asynchronous fashion ?

  2. Imagine i have the following tables in my database:

TableChats
TableChatMessages

and i also have a class
Message

To work with ListViews and have those list views use data from the ContentProvider must that data returned be a Cursor ? or is it possible to query for all messages in a chat and return an array of Message.
Sorry i know this may be a dumb question but i’m new to android development and the concept of ContentProvider and ListViews and how to connect them isn’t quite yet clear to me.

  • 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-11T18:09:58+00:00Added an answer on June 11, 2026 at 6:09 pm

    To my knowledge

    1. A content provider manages access to a central repository of data which shared between multiple applications. Normally all methods access the data work on the UI thread. If you want asynchronous, they suggest to use CursorLoader.
    2. You can query all messages, get data from Cursor and put to your Message object.

    Sample:

           Cursor sampleCursor = getContentResolver().query("Your query");
        ArrayList<Message> list;
            if(sampleCursor!=null){
        while(sampleCursor.moveNext()){
            Message item = new Message();
    
            item.sender = sampleCursor.getString(senderColumnIndex);
            item.messageBody= sampleCursor.getString(messageBodyColumnIndex);
        list.add(item);
        }}
    //Pass your list to your adapter.
    

    Or directly pass your cursor using CursorAdapter

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

Sidebar

Related Questions

I have two questions, actaully... First off, Why cant I do this: List<Object> object
This is actually two questions rolled into one. Is there a particular type of
I actually have two questions: (1) Is it possible to put another image on
I have two separate installs of WebSphere. (Actually one is WebSphere Application Server V6.1
This is actually two questions in one: First, when you write your XAML and
These are actually two questions relating to an online bookstore. I have a table
I actually have two questions, I found the answer to the second and didn't
Actually, this is two questions: What is the correct way to use the SCSS
I have two questions related to C++: In many textbooks, the keyword this is
This is actually two questions: The first relates to my program The second is

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.