B4J Question Dose B4J suport Service Module ?

Discussion in 'B4J Questions' started by little3399, Mar 16, 2015.

  1. little3399

    little3399 Active Member Licensed User

    Hi .
    Dose B4J suport Service Module just like B4A ? TKS!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    In B4J you can treat any code module as if it is a service. It can run in the background or foreground.
     
  3. Beja

    Beja Expert Licensed User

    Does it need special care when writing it, so Windows can not kill it, and can start at boot? in other words, does a service n b4j has all the (features) of Android service?
    Thanks.

    p.s.
    I am asking this question because I want to use it as email server, and then have it share the received email with other running Windows applications.
     
  4. wl

    wl Well-Known Member Licensed User

    Hi,

    The lifecycle of a B4J application is different than that from a B4A application.

    On Android the OS can easily kill processes when the OS decides it is needed. For Java applications (created by B4J) once an application is started the OS will not kill it by itself, so you can rest assured that when an application is started it will keep running until it is killed explicitly.

    I don't think B4J can create "service" applications (as in Windows services) as such type of applications do not exist on other OS's (Linux for example): in Linux for example you can just start an application as a cronjob (or @reboot).
     
  5. Beja

    Beja Expert Licensed User

    So one can write it without UI or run it minimized.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice