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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:26+00:00 2026-05-26T10:36:26+00:00

In my android app there is a relatively long running AsyncTask I’m running to

  • 0

In my android app there is a relatively long running AsyncTask I’m running to update the database when the app starts up. I’m needing to wrap that in a transaction to roll things back if the user exits the app before the task is finished. However since wrapping the code in a transaction it is blocking the ui untill the task is complete. Why would this be since the code is already running in a separate thread?

I’m using ORMLite and this is the wrapper for the transaction basically,the code to update the db goes inside call().., before adding the code to update the db inside a transaction there was no locking of the ui…

public ConnectionSource source; 
@Override
protected Boolean doInBackground(Context... params) {
    try {
        TransactionManager.callInTransaction(source, new Callable<Void>() {
            public Void call() throws Exception {
                return null;
            }
        });
  • 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-26T10:36:27+00:00Added an answer on May 26, 2026 at 10:36 am

    Unfortunately, SQLite transactions are exclusive and they block all other database activity. I suspect that even though you are in another thread, the UI thread is doing some sort of database activity which has to wait for the transaction to finish.

    • Here’s a related question.
    • Here’s the docs about SQLite transaction levels.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way in android app that we can add some text or
Is there some way that an Android app written in Air can send data
How large can be the database of my Android app? Is there a limit?
Is there a way in which an Android App calls the Content Provider by
Is there any way to play video in Android App widget.
Is there a way to send -D directives to an android app? On desktop
I am currently developing an android app, there is always unexpected exception popup when
I'm using eclipse to build an android app which is tracked in TFS. There's
if yes, is there a tutorial available for creating an android app using the
I am working on an Android login app for a service called Netclassroom. There

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.