B4J Question B4J: background work (service)

peacemaker

Expert
Licensed User
Longtime User
How to make for UI app ? Searching forum is a pain now, when Android and B4J resualts are together.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Sure using "b4j", anyway.
I mean - how to make sure that B4J GUI app is working in background after MainForm.Close ?
Or how to arrange working as service, with no forms visible ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can create a non-UI app if you don't want to show any UI.

You can use this code to prevent the app from closing when the last form is closed:
B4X:
Dim platform As JavaObject
platform.InitializeStatic("javafx.application.Platform")
platform.RunMethod("setImplicitExit", Array As Object(false))

Both Android services and activities behave the same as B4J code modules.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Thanks, will try.
No, non-UI app is not needed. It needs a standard UI app that started and working in background, and able to show any form, or msgbox...
Maybe having an icon in the tray - standard Windows app.
 
Upvote 0
Top