Skip to content

Request for official automation API support (MacroDroid/Tasker integration) #251

@doriel1243

Description

@doriel1243

Hello.

First of all, thank you for creating GPS Logger. The application works very well for vehicle GPS tracking and GPX logging.

I would like to report some difficulties related to automation and integration with MacroDroid/Tasker on modern Android versions.

My use case:

  • automatic trip recording in a car
  • start recording when the phone connects to the car Bluetooth
  • stop recording when Bluetooth disconnects
  • fully automatic workflow without user interaction

Initially, I tried to automate the app using standard Android UI automation:

  • wake screen
  • unlock device
  • press the Record button automatically

However, modern Android security restrictions create serious problems with this approach:

  • Accessibility-based unlock automation triggers Android security protection
  • biometric unlock methods become disabled temporarily
  • Smart Lock / trusted Bluetooth devices stop working
  • Android displays messages similar to:
    "Device was locked by a third-party app"
  • the user is forced to manually enter the PIN again

This makes UI automation unsuitable for real-world automotive usage.

I then investigated whether GPS Logger exposes any automation API.

Using ADB:

adb shell dumpsys package eu.basicairdata.graziano.gpslogger

I found:

  • no exported broadcast intents
  • no exported start/stop recording service
  • GPSService exists but is not externally accessible

Attempting:

adb shell am startservice -n eu.basicairdata.graziano.gpslogger/.GPSService

returns:

Error: Requires permission not exported from uid

After additional testing, I discovered that recording can be toggled using:

adb shell input keyevent 46

However:

  • this only works when GPSActivity is currently focused

  • it does not work:

    • with screen off
    • from background
    • when another app is focused
    • from lockscreen

So GPS Logger currently supports keyboard shortcuts, but only through the focused Activity input pipeline.

Eventually, I managed to create a workaround using:

  • rooted device
  • "screen off without lock"
  • MacroDroid automation
  • launching GPS Logger Activity
  • sending keyevent 46

This works, but it is quite complex and fragile.

I believe GPS Logger would benefit greatly from an official automation interface.

Suggested improvements:

  • documented broadcast intents:

    • START_RECORDING
    • STOP_RECORDING
    • TOGGLE_RECORDING
  • exported foreground service commands

  • Tasker/MacroDroid integration support

  • ability to start recording from background without UI focus

  • documentation for supported hotkeys and automation behavior

This would make GPS Logger much easier to use in:

  • car automation
  • dashcam workflows
  • cycling setups
  • unattended GPS logging systems

Thank you again for the excellent application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions