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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:31:34+00:00 2026-05-23T10:31:34+00:00

I need some help or suggestions regarding Background services. Well I want to achieve

  • 0

I need some help or suggestions regarding Background services.

Well I want to achieve this. I have an application with Some Views that application also has a Background Service that always keeps on running.

In my views there is a Button whenever I press that button, that button passes some files to the Background Service and my Background service upload that file onto some server.

I am done with the uploading process. Now I want to know that how can I make a Background Service that always keeps on running and on my tapping of the button it sends a file to the Service.

I am new in Background service implementation.

Please guide Friends with some tutorials, suggestions or guidelines.

Thanks a bunch

  • 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-23T10:31:34+00:00Added an answer on May 23, 2026 at 10:31 am

    You’ve probably already read some of the Android Service documentation, but I suggest studying it further and looking at the Local Service Sample if you have not done so already:

    http://developer.android.com/reference/android/app/Service.html

    It sounds like you have already got your Service up and running, and I think the actual problem you are trying to solve now is how to communicate data from your Activity to your Service. When your Activity is bound with a Service that’s part of the same application, that service is in the same process and runs on the same main UI thread, so once you get the IBinder object from the Service after binding with it, you can simply directly call the functions in that Service from your Activity. Similarly, you can pass your Service a handler object from your Activity so that the service can send messages or post Runnables to your Activity. Communication with a local Service is therefore quite simple.

    So if you take a look at the Local Service Sample in the link above, you will see a section in the code where we get a reference to the Service once binding has completed:

    mBoundService = ((LocalService.LocalBinder)service).getService();
    

    After that point, it’s possible to directly call methods on that Service that’s in the same application. For example, you could have a method called sendFile in your Service. In your Activity, you might do something like:

    mBoundService.sendFile( myStuffObject );
    

    There are quite a number of questions on Stack Overflow regarding communicating between an Activity and a Service, and I think you’d find it beneficial to search and read these.

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

Sidebar

Related Questions

Need some help to solve this. I have a gridview and inside the gridview
Need some help with DataFormatString in GridView. I have a Double value that needs
I need some help on using this pre-historic application: hyperterminal. I need to send
I have this idea which I need some help with. Currently I am developing
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help with this problem in implementing with XSLT, I had already implemented
Need some help gathering thoughts on this issue. Our team is moving ahead with
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help assigning a mouseover event to display some icons that start out
Need some help with a query.. I have three tables. Source id name 1

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.