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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:39:08+00:00 2026-05-26T08:39:08+00:00

I currently have a remote service that communicates constantly with an activity on the

  • 0

I currently have a remote service that communicates constantly with an activity on the same app.

I need to send messages in and out extensively at some times. Which method of messaging is better, faster, and battery friendly? Using messages or aidl interface?

As of now I’m using aidl interface but for some reason I think there is a lot of overhead specially when attaching listeners…

Any feedback greatly appreciated.

  • 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-26T08:39:08+00:00Added an answer on May 26, 2026 at 8:39 am

    I currently have a remote service that communicates constantly with an activity on the same app.

    A remote services is generally not a good idea.

    Well, my app is a multimedia audio application that needs to run in the background which requires a lot of resources: memory. Having this in the same process as my activities would most likely bring issues to reaching the limit of resource usage per process.

    Then use less memory. A audio player should not need to exceed the per-process RAM limits, even with activities.

    Also, the benefits are, if your UI crashes for some reason your service doesn’t.

    This is not a particularly good reason for wasting device RAM and CPU time. That’s a fine approach for a server, less so for an embedded system.

    Which method of messaging is better, faster, and battery friendly? Using messages or aidl interface?

    They should be fairly comparable. IPC considerations should swamp most other effects. For example, quoting myself from one of my books:

    For example, in the CPU-Java/AIDLOverhead directory of the book’s source
    code, you will find a pair of projects implementing the same do-nothing
    method in equivalent services. One uses AIDL and is bound to remotely
    from a separate client application; the other is a local service in the client
    application itself. The client then calls the do-nothing method 1 million
    times for each of the two services. On average, on a Samsung Galaxy Tab
    10.1, 1 million calls takes around 170 seconds for the remote service, while it
    takes around 170 milliseconds for the local service. Hence, the overhead of
    an individual remote method invocation is small (~170 microseconds), but
    doing lots of them in a loop, or as the user flings a ListView, might become
    noticeable.

    That being said, if you are concerned about the overhead (yet insist on the remote service), you are probably better served trying both and using logging to determine if there is a clear winner.

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

Sidebar

Related Questions

I currently have a WCF service to consume a remote REST service with the
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I currently have a DetailsView in ASP.NET that gets data from the database based
We have a gwt app that uses jcifs to pull the user name from
I have created objects that are interfaces to a web service. One typical object
I have written a windows service in C# that essentially listens for commands on
I have a specific scenario that I want to solve. I currently connect to
I currently have a WCF service with webHttp bindings, im attempting to increase the
I have to call a Web service that is extremely demanding (unstandard) regarding the

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.