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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:12:41+00:00 2026-05-27T09:12:41+00:00

Let me quickly introduce myself: over 30 years of programming in general, over 12

  • 0

Let me quickly introduce myself: over 30 years of programming in general, over 12 years of Java, less than 3 weeks of Android.

My question is about my architecture/design. Being so novice in Android, I wonder if the whole idea makes sense. Basically, I want to build a Telnet-like terminal. Such a terminal normally has a long-lived TCP connection that would be nice not to be dropped every time the activity that displays the screen goes away or whenever Android feels like it. My idea is to use a service that keeps the connection open and contains the current telnet screen contents. When the activity is (re)created, it starts the service and retrieves the screen contents and the connection (java.net.Socket). It displays the contents and uses the socket for further user interraction. If the user intentionally disconnects, only then I stop the service.

To avoid the user forgetting that his telnet session is open somwhere in the background, I would also put something in the notification area while the service is running.

Thanks!

  • 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-27T09:12:42+00:00Added an answer on May 27, 2026 at 9:12 am

    You should take a look at Android: keeping a background service alive (preventing process death)

    Basically you can start your service this way, with a notification being shown to the user, so that the system will not kill your service (under normal circumstances).

    So Android sort of requires that you show the user a notification if you are going to keep something running, and if you do that then in turn it will not kill your service.

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

Sidebar

Related Questions

I'm trying to write a short function that will let me quickly read in
Is there any short-cut or device in Visual Studio to let me quickly get
This is quite an interesting question so let me set the scene. I work
I'm looking for some C++ code to let me quickly move a bitmap around
Let's say we have a mobile-friendly website www.mywebsite.com that I want to quickly turn
First let me say that this is not about production settings for django -
Let me preface this question by saying there may be a completely different solution
Let me quickly explain. I have an application to manage visitors. We have a
EDIT: 1. Let's not make this a general vim/emacs debate. I know some people
Let's say the bottleneck of my Java program really is some tight loops to

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.