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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:40:27+00:00 2026-06-14T14:40:27+00:00

I am currently developing Android application with webservice synchronization and everything is working smoothly,

  • 0

I am currently developing Android application with webservice synchronization and everything is working smoothly, but I need to create a background Update service, for data fetching to database. Last couple days, I’ve been searching for information how to accomplish this and I found many solution, which confused me pretty badly.

I am fetching data using asyncTask which fire up the httpClient and the I parse response and save it to database. After that I send an intent to launch an Activity. Simple stuff.

I want a service, which would fetch the data while the application isn’t running. And probably stop the service, when user start the application.

I manage to write a Service class with thread sleep, but this seems like a pretty bad solution.

Another solution I found, is by using pendingIntent and broadcast receivers.

I am not sure if sending broadcast intent is a secure enough. If someone plug his phone into a debugger, he would see every intent broadcast, right? Which means he/she could mess with my application (like send an broadcast intent, which would inform application that new data has been fetch, when in reality, that would not be the case).

I also don’t want to getting my service killed by system.

Is there any simple and effective solution for this? I kinda struggle to find something suited for me needs and I am pretty new to Android programing to write it by myself. I found many solution, but I really don’t know which one is “right” solution, which is the most effective.

  • 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-14T14:40:28+00:00Added an answer on June 14, 2026 at 2:40 pm

    You should use AlarmaManager to schedule periodic tasks. No long running service needed. It just executes the schedule pending intent and finishes after all the execution is complete.

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

Sidebar

Related Questions

I'm currently developing an android application, and because i need to access a database,
I'm currently developing an android application. It needs to update a textview value periodically.
I'm developing an android application. I want to create animation with imageviews . Currently,
I'm currently developing an Android application which needs to receive data from a bluetooth
I'm currently developing an Android application that fetches images using http requests. It would
I'm currently developing an android application that uses sockets to connect to a local
I am currently developing an android application using eclipse and I already have a
I'm developing android application with phonegap . Currently I'm facing one problem with inputbox
My team and I are currently developing an application for both Android and iOS
I am currently developing for android and using some face recognition services. The service

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.