Traccar client hidden not restarted after device wakes from sleep

Tihomir5 years ago

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.

Anton Tananaev5 years ago

There are intents that you can use to start the service.

Tihomir5 years ago

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?

  1. I can choose : Activity or Service
  2. field Class name
  3. field Flags
  4. field Intent action
  5. field Intent category
  6. field Intent data
  7. field Intent type
  8. field Intent package
  9. field Intent extras
  10. field Name (this is obvious)

Thank you very much for your help and a great app!

Tihomir5 years ago

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"

Tihomir5 years ago

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?