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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:45:04+00:00 2026-05-28T13:45:04+00:00

Seems the Google-recommended way (using the android support library) for a fragment or activity

  • 0

Seems the Google-recommended way (using the android support library) for a fragment or activity to interact with a sqlite database is via a loader that extends AsyncTaskLoader and works similar to the way CursorLoader does for ContentProviders.

A single activity or fragment may interact with a database in a variety of ways, updating, deleting, and querying data in one or more tables. But since a loader has only one place in which to carry out database manipulation (i.e. in loadInBackground()), is the developer expected to write a separate loader for each type of interaction, especially since it seems the only way to parametrize the behavior in loadInBackground() is by passing arguments to the loader’s constructor via the args argument to LoaderManager.initLoader()?

Thanks much.

  • 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-28T13:45:04+00:00Added an answer on May 28, 2026 at 1:45 pm

    When not using a ContentProvider, i.e. when using sqlite directly, use AsyncTaskLoader if the set of database operations to be performed returns a Cursor. The set may include any kind of operation – update, query, delete, insert. These operations should be executed in AsyncTaskLoader.loadInBackground().

    If the set of database operations does not result in a Cursor being returned, use an AsyncTask. In this case, the operations should be executed in AsyncTask.doInBackground().

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

Sidebar

Related Questions

It seems that licensing terms would prevent us from using Google Maps API in
We've been developing an Android application which includes Google Adsense. However there seems to
I'm trying to generate a PNG file using C#. Everything I google seems to
Does anyone know what is := for? I tried googling but it seems google
I'm interested in texture streaming in DirectX but google seems unhelpful. Maybe I just
This seems to be an absurdly simple question but Google and Stack Overflow searches
The http://code.google.com/p/pywebkitgtk/ looks great but it seems to be running on linux only. Does
I've installed the Google Plugin for Eclipse 3.4 and it seems to work fine.
I'm trying to make a google-chart with transparency, but it seems not to work.
I am having problems with the google maps API V3. It seems that every

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.