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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:00:31+00:00 2026-06-07T20:00:31+00:00

I was wondering what the relationship is between an Android service and the activity

  • 0

I was wondering what the relationship is between an Android service and the activity that started it (which is happening in this case, via the StartService() method) ?

Is the service just another thread running within the same process the activity belongs, or does it get its own ?

The reason I ask is b/c I’m using a SQLite DB that is going to be accessed from both an activity and the service that it kicks off, and so need to determine the proper way to syncronize DB access between them (leverage the built-in multi-threading support of SQLite, or implement some homegrown interprocess snycronization methodology).

note: I’m not asking how to syncronize access, I’m trying to figure out weather I’m accessing the DB from two seperate processes or seperate threads, which will dictate how I go about this.

note: I’m writing in .net/mono using Mono.Data.Sqlite, not in raw Android/Java.

Any insight is welcome and appreciated, Thanks.

  • 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-07T20:00:34+00:00Added an answer on June 7, 2026 at 8:00 pm

    Does the android developer site not contain your answer? It goes into great detail of the Service and Activity.

    Caution: A service runs in the main thread of its hosting process—the
    service does not create its own thread and does not run in a separate
    process (unless you specify otherwise). This means that, if your
    service is going to do any CPU intensive work or blocking operations
    (such as MP3 playback or networking), you should create a new thread
    within the service to do that work. By using a separate thread, you
    will reduce the risk of Application Not Responding (ANR) errors and
    the application’s main thread can remain dedicated to user interaction
    with your activities.

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

Sidebar

Related Questions

I am wondering about the relationship between .NET ClassLoader and Assembly I use the
It may looks a naive question but I am wondering about the relationship between
I am wondering on the relationship between a block of samples and its time
I'm just wondering how people working in teams manage the relationship between the logic
I have a parent/child relationship defined which, unfortunately, cannot be maintained via a foreign
I was wondering if I can model the relationship between the two class hierarchies
Wondering if there is any way to get the lambda expressions that result from
Wondering if anyone can suggest a good file replication tool that will replicate across
Wondering if there is a good way to generate temporary URLs that expire in
Wondering if I could get some advice and direction on this following requirement: Need

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.