So, I have Android 9 car head unit, and traccar works great (both hidden and not hidden version). When I reboot the unit, traccar service starts fine, however when my unit goes to sleep and wakes up, traccar service doesnt work anymore (I need to manually open https://www.traccar.org/hidden/).
There is one app (MTCD tools) which I use to restart some other applications on wake up, however it seems that it does not work with hidden version of traccar. I have set in MTCD tools to open app "Device Settings" which is hidden traccar but I doesnt open Traccar GUI and doesnt restart traccar service.
I did try standard Traccar client, and it works with MTCD tools on wakeup, however in this case Traccar GUI is visible and I need it to be hidden.
Is there some other process/service I need to restart, because directly openning "Device Settings" does not restart traccar service.
Thank you.
There are intents that you can use to start the service.
OK,so I did find a option in MTCD "Create a new start intent action":
This are the required fields, can yo help me what should I input?
- I can choose : Activity or Service
- field Class name
- field Flags
- field Intent action
- field Intent category
- field Intent data
- field Intent type
- field Intent package
- field Intent extras
- field Name (this is obvious)
Thank you very much for your help and a great app!
Found the answer on traccar forums:
Add action: Send Intent
Extra "action:start", or "action:stop"
Package: "org.traccar.client"
Class: "org.traccar.client.ShortcutActivity"
Target: Activity
However, after wake up I got this message and traccar still not working:
"Unable to find explicit activity class {org.traccar.client/org.traccar.client.ShortcutActivity};have you declared this activity in your AndroidManifest.xml"
Just installed regular traccar client and this intents works, however it doesn't work with hidden version.
@Anton Tananaev can you please give me full intent class name for hidden version?
So, I have Android 9 car head unit, and traccar works great (both hidden and not hidden version). When I reboot the unit, traccar service starts fine, however when my unit goes to sleep and wakes up, traccar service doesnt work anymore (I need to manually open https://www.traccar.org/hidden/).
There is one app (MTCD tools) which I use to restart some other applications on wake up, however it seems that it does not work with hidden version of traccar. I have set in MTCD tools to open app "Device Settings" which is hidden traccar but I doesnt open Traccar GUI and doesnt restart traccar service.
I did try standard Traccar client, and it works with MTCD tools on wakeup, however in this case Traccar GUI is visible and I need it to be hidden.
Is there some other process/service I need to restart, because directly openning "Device Settings" does not restart traccar service.
Thank you.