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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:42:19+00:00 2026-06-10T01:42:19+00:00

I have a small chat application. When it starts it binds to a service.

  • 0

I have a small chat application. When it starts it binds to a service. This service has a tcp/ip connection with the server.

When the application is not in foreground my service creates a status notification. So far so good.

When the application is destroyed for example using task manager on “onDestroy” method I call unbind. Now the service is killed.
So my question is how I make a service to stay alive even there is no clients bind with it.

Googe doc: ” The service will remain running as long as the connection is established (whether or not the client retains a reference on the service’s IBinder).”

Thanl you.

  • 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-10T01:42:20+00:00Added an answer on June 10, 2026 at 1:42 am

    You can make your service a foreground service, which will display an icon in the notification bar so that the user can see your service is running. Otherwise, you cannot keep your service running. By the way, you should be aware that an everlasting service is an Android antipattern, the system should be able to kill off your app when memory is low, and apps haven’t used it in a while. If you are doing something that legitimately needs to live “forever” you should do so with a foreground service.

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

Sidebar

Related Questions

I have a small application, serving connections(like a chat). It catches the connection, grabs
I have a small application that I am building a Chat application into, so
I'm currently learning node.js by developing a small chat application over TCP (classic case).
I wanted to develop a small web based chat application. Currently I have developed
I have written a small chat app that uses mysql + php to facilitate
I have small question. When I started to programm my application, I grouped types
We have a web application which has been developed over the past 7 months.
I have 2 questions for you. Im creating an Application for Chat that relies
I used to have a small chat app(which was almost working), that uses PHP,
As you must have seen in gmail, a small popup appears to chat when

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.