You have to create shortcuts for starting and stopping service. Then just use those shortcuts in Tasker.
I tried that, those shortcuts don't show up in Tasker, would you be able to share the command line for those two options?
I don't have Tasker app, so I don't really know where to look for it, but there must be an option to call shortcuts. I don't know what you mean by "command line".
Sorry, is it the same executable that is used to start the service? If so, what additional data is passed to the executable so that it knows you're trying to start the service, as opposed to opening the user interface
Are you talking about Android? What do you mean by executable? There are no executable files, there are intents. Shortcuts to start/stop service have different intents than default launcher shortcut.
How are they different? That might alone answer the question. Yes, this is Android
Basically, how does the operating system call service start and the service exit, compared to starting the user interface
One starts MainActivity, the other one ShortcutActivity.
What about the Third? Isn't there are three possible courses of action: start the service, stop the service, and start the user interface?
Start and stop service - ShortcutActivity with a boolean flag (indicating start or stop)
User interface - MainActivity
Is the boolean true/false, or start/stop. Also is it stored in a particular variable (probably won't need the latter, but just in case)
It's passed with "shortcutAction" as a key. Boolean is always "true" or "false". There are no other options. In this particular case true means to start the service, false means to stop the service.
I'm testing now. If I get it I'll post the final product
This is what I'm currently trying without success. The UI loads (it doesn't need to) but is blank and the service doesn't start, I have to be missing something simple
Changed data to read shortcutAction:true
but also to the same effect
Has anyone had any luck starting and stopping the traccar service with Tasker? If so can you share the actual task screen