mendhak/gpslogger

Intents - not working for Automagic

Closed this issue · 11 comments

(Excuse me for I do not know much about android apps and their components, I may use the wrong terms or concepts to describe this issue)
I'm trying to use Automagic (alternative to Llama or Tasker) to automate GPSLogger, but I cannot configure any "intent" to start / stop logging. I followed the description in the FAQ, and checked some posts here, but when I try to create a "Start Activity" command I get an error stating "com.mendhak.gpslogger.TaskerReceiver" does not exist. I do not get this message when creating a "Send Broadcast" action, but GPSLogger does not start or stop. Any clue?

2023-7-17_23-11-9

I can start GPSLogger by using a "launch shortcut" action, this starts logging... but brings GPSLogger window to the foreground, and I'd like to avoid that.

Sorry for late reply. Most of what you've shown seems fine. I wanted to try it myself to see if there's something missing but I can't seem to get AutoMagic working - it won't let me get past the grant access to storage screen as I can't grant access to anything (the button stays grayed out)

it may be due to your android version, there seems to be difficult to install after android 9.0, I use marshmallow 7.1

I tried in a 7.1 emulator and this worked for me.

image

Looks like just changing the extra is enough putBoolean("immediatestart", true)

Not really: the broadcast intent just works when GpsLogger is not running. If you run the Automagic broadcast action a second time, after stopping the logger but without closing the app, you'll see the log does not start.

This seems to work, can you check:

Screen_recording_20230909_150717.mp4

I do not get the same result, it must be sth with my phone.

I can't think of what could be causing that behavior... could there be anything else at play? If I'm understanding correctly, at least it works the first time. When you try to invoke it the second time, does the "Log View" show that an intent was received? Is the logger being stopped in any special way?

I attach the gpslogger log file for the video.
https://easyupload.io/tn4y2q
https://easyupload.io/c706jt
There is no "intent" in automatic log file, but the broadcast is recognized.

I see as part of the stack trace something seems to have (?) injected itself in there?

de.robv.android.xposed.XposedBridge

I'm not sure what that is, but are you able to exclude GPSLogger from the Xposed application.

The Service not registered: com.mendhak.gpslogger.GpsMainActivity$10@11b673f seems to be quite telling as it could explain why things didn't work the second time.

to be honest i did not check the log I sent you. As there are many mobile users with Xposed &| Magisk installed, I think it would be good if you checked how to make gpslogger compatible with those. Anyway, it's quite surprising, for...:
- ... i disabled Xposed completely, but I stil get the error related to Xposed (see debuglog.txt
). I think Xposed injects some code in android to control application startup from the boot up process, and it does not depend on whether xposed application and modules are enabled or not.
- i can tell you xposed has been installed on my mobile for the last 4-5 years and gave me no such trouble with any other app. however i made a quick google search and i see similar errors are quite common.

So I'll have to live with that. I use Xposed features much more frequently than GPSLogger...

there is one thing I do not undesrtand: why GPSLogger starts the log process when clicking on the notification, and it does not when swapping apps