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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:47:30+00:00 2026-05-22T22:47:30+00:00

Hello Android Gurus For API Level 7 and Above–> I am badly struck trying

  • 0

Hello Android Gurus
For API Level 7 and Above–>
I am badly struck trying to figure out a solution for the following problem:

I have an activity which i would use to Kick start an Service. This is an infinite loop service which can run forever. I would like to disconnect the Service from Activity and at a later point of time i will call the activity again which should tell me the current state of Service and i can Stop the service.

Is something like this possible. Right now my Service is Sticky and i am not able to Close the activity as Service is running for ever and i am also not able to Stop the service from activity.

Code samples would be of great help!!! Thanks in advance…

  • 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-22T22:47:31+00:00Added an answer on May 22, 2026 at 10:47 pm

    Multiple questions:

    1. You can disconnect/reconnect from the Service using bind. Unfortunately the best advice to give there is to carefully read the documentation for Service at http://developer.android.com/reference/android/app/Service.html: look carefully at the Local Service example, as it demonstrates what you need to do to bind/unbind to a sticky service.

    2. To stop it, once you’ve bound you can call stopSelf.

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

Sidebar

Related Questions

I'm using the following tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html in order to create a map view and
I've been following this tutorial: http://developer.android.com/resources/tutorials/views/hello-mapview.html but in onTap mContext is throwing a NullPointerException..
I'm following the example here: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html Everything works fine. The first time I click
hi when i run hello Android test http://developer.android.com/resources/tutorials/testing/helloandroid_test.html i got the following errors java.lang.RuntimeException:
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello again ladies and gents! OK, following on from my other question on ASP.NET
When I tried to do a simple modification of the hello android program that
I'm trying to get started with Android development. I'm using eclipse on Linux and
I am trying the VERY basic tutorial for Android and can't seem to get
Hello In my android application i would like to get Time since when 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.