Trigger/condition for pixel stand?

Post your questions and help other users.

Moderator: Martin

Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Re: Trigger/condition for pixel stand?

Post by Gen » 26 Jun 2019 20:45

I think we're almost there but not quite working yet.

It always evaluates to true.

I think there is something wrong with the command as I checked debug dialog and stdout is blank.

Also, checking logcat I can see that the expression runs before the intent. I tried to fix this by adding a 1s sleep after the root command but stdout still blank.

If we're specifying logcat with a trigger time minus 3 seconds does that mean it will check for logs 3 seconds before the trigger time? The intent wouldn't have run at that stage.

I think we need the trigger to run then wait 1 second then check last second of logs.

Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Re: Trigger/condition for pixel stand?

Post by Gen » 27 Jun 2019 07:19

Ah, I realised why the command wasn't working. Had a syntax error in the execute root command action *facepalm*.

The command and the expression are working now so I think after adding the 1s delay it should work.

I'll check tonight as I'm not at home and let you know.

Thanks a lot for your help! You're awesome :D

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Trigger/condition for pixel stand?

Post by Desmanto » 27 Jun 2019 16:07

Oh, just about to suggest you to check the command in terminal emulator with root. logcat -t time is to get the logcat only from the time you specified until the moment you run the logcat. So if you have sleep 1s at there, it should around 4 seconds now. Try to check and see how short you can reduce the sleep amount.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Gen
Posts: 23
Joined: 09 Mar 2019 10:02

Re: Trigger/condition for pixel stand?

Post by Gen » 27 Jun 2019 20:28

Thanks!

Works perfectly.

Executes flow 1 in car and flow 2 on stand.

I'll tweak the timings to make it more efficient :)

Thanks a lot for your help!

Post Reply