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

  • Home
  • SEARCH
  • 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 417823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:37:05+00:00 2026-05-12T18:37:05+00:00

I have a mix-case IDL service that I’m using in 2 ways: The service

  • 0

I have a mix-case IDL service that I’m using in 2 ways:

  1. The service will spawn a thread and make a network call to grab some XML content on Activity’s behalf. The content is return back to the Activity through client’s IDL that defines callback methods
  2. If user chooses notification option then service creates a Timer that gets executed repeatedly and creates a toolbar notification. It also cached the content so when Activity request an update it is served from the cache rather than another network call

So my questions are

  1. For scenario #1 what is the price (if any) I’m paying for using service for network calls instead of creating background thread directly in the Activity?
  2. For #2 – am I better off changing implementation to AlarmManager? I noticed that when I kill processes with TasKiller my service dies and never gets restarted, would AlarmManager-base job have better chance of recovery?
  • 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-12T18:37:05+00:00Added an answer on May 12, 2026 at 6:37 pm

    For scenario #1 what is the price (if
    any) I’m paying for using service for
    network calls instead of creating
    background thread directly in the
    Activity?

    I am assuming that, since you said this is an “IDL service”, that this is what I call a remote service — you are using AIDL to define an interface that is being used across process boundaries.

    In that case, the cost is several MB of RAM for the second process, plus a bit of CPU time for the IPC overhead. How much that “bit of CPU time” is depends on how frequently it is called.

    For #2 – am I better off changing
    implementation to AlarmManager?

    Generally, yes. Ideally, services are in memory as little as possible.

    I noticed that when I kill processes
    with TasKiller my service dies and
    never gets restarted, would
    AlarmManager-base job have better
    chance of recovery?

    No, because “task killer” apps tend to abuse an API (in Dianne Hackborn’s words) that will kill off everything, including scheduled alarms. At present, there is no reliable & efficient defense against “task killers” that I am aware of.

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

Sidebar

Related Questions

I have a source directory that includes a mix of different languages and files.
I have a code that is a mix of HTML and js. I cannot
I have a varchar(100) column in a table that contains a mix of integers
The basic problem I'm trying to solve is that I have a mix of
I have a collection of strings that need to be parsed (using RegEx patterns)
My app has windows that are components. In my case, now I have 2
I have a service layer that retrieves a DTO from a repository. Depending on
I have a complex application that contains a mix of JSF and Apache MyFaces.
I have two strings in a java program, which I want to mix in
What was the best video/session at Mix 2010? The videos have been put up

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.