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

The Archive Base Latest Questions

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

Should we start async task from within onHandleIntent() method of IntentService ? I read

  • 0

Should we start async task from within onHandleIntent() method of IntentService? I read that onHandleIntent() runs in worker thread so will it be safe to start asyncTask from there??

  • 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-14T18:56:04+00:00Added an answer on June 14, 2026 at 6:56 pm

    IntentServices already are background-processes; there’s no need to start an AsyncTask from there. Also, starting an AsyncTask is ‘safe’ from anywhere; it’s a helper class that helps you multithread. Just make sure you don’t manipulate Views in the doInBackground()-method of your AsyncTask if you use it in your Activity.

    If you need to spawn multiple threads inside your IntentService, just use:

    new Thread(Runnable r).start();

    See an example at How to run a Runnable thread in Android?

    If you need to call some kind of callback, use Handler. For an example, see http://www.vogella.com/articles/AndroidPerformance/article.html#handler

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

Sidebar

Related Questions

i have uitextfield i wan that it should start entering text from top instead
I read a lot of posts that convinced me I should start writing unit
So any custom data attribute that I use should start with data-: <li class=user
I need to verify in php that a string should not start or end
I have splash activity that should download data from the url parse it and
Is there any way to prevent the doInBackground method/thread of an AsyncTask from starting
I am using a Task to read some data from the Database etc. Let's
Is it bad to have expensive code at the start of an async method,
If I launch std::async with std::launch::async policy shouldn't it start every async task in
I've got an IntentService that I want to start upon onCreate. It's a fire

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.