1. Are you ready for the Galaxy S20? Here is everything we know so far!

Lifecycle on long running processes

Discussion in 'Android Development' started by brtancs, Aug 17, 2010.

  1. brtancs

    brtancs Lurker
    Thread Starter

    Hi,

    I'm wanting to push various binary data to applications I have running on Android 1.6 devices. I'm considering a combination of SMS messages and running either a service listening on a socket or a web server on the phone.

    I'm curious though; at what point the running web server or service (the minimal execution scenario is just waiting on a socket) would be stopped by the OS automatically, if ever.

    Also, if the server is stopped automatically - can the user be notified and/or given a choice on whether to proceed with stopping the app; or is there a way to except a process from automatic cleanup? From the docs, I'm guessing no here.

    thanks.
     


  2. cp1

    cp1 Android Enthusiast

    I think you can use setForeground or startForeground, depending on the android version.
     
    brtancs likes this.
  3. brtancs

    brtancs Lurker
    Thread Starter

    looks good, thanks
     
Loading...
Similar Threads - Lifecycle long running
  1. JamesJoey
    Replies:
    4
    Views:
    306
  2. silasp
    Replies:
    4
    Views:
    408
  3. Son Etot
    Replies:
    5
    Views:
    1,376
  4. Aashna Jain
    Replies:
    2
    Views:
    542
  5. epicmarketer
    Replies:
    1
    Views:
    324
  6. Milo Willamson
    Replies:
    15
    Views:
    643
  7. Android News
    Replies:
    0
    Views:
    230
  8. SampsonNation
    Replies:
    0
    Views:
    829
  9. lgv30714
    Replies:
    9
    Views:
    403
  10. 23tony
    Replies:
    2
    Views:
    517

Share This Page

Loading...