B4J Question B4J Windows service: background app, but with UI

peacemaker

Expert
Licensed User
Longtime User
Hi, All

If we need stable working always in memory background app under Windows, it means
1) minimal setting interface window after tray icon menu click
2) and background work as a Windows service

What is actual variant in 2024? Code example ?
 

DonManfred

Expert
Licensed User
Longtime User

Services in Windows can not have any UI.
To have a trayicon you have to run an ui-app with tray-icon which should interact with the service.

I don´t know to do all these steps in B4X. And i fear it will be a hard task.

It is possible but you have to do some Steps to solve.

PD: I for myself would not use Java (or B4X) to build a Windowsservice.
 
Last edited:
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Create an installable package and add the function to enable your app on the starting apps.
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
The pattern I use is to have a jetty web server as part of the service. You can use web sockets or REST to send commands to the app. For example if I need to restart the app I have an html page that allows me to do this.

I deploy my service using this;


I use WinRar to create an installer for the app.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Thanks for reply. But it looks "not easy" to follow up. I mean, there is no any detailed, the full test project example with all files in a bundle to download, see, compile, setup, edit settings...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…