delay on flows that launch app / shortcut?

Post your questions and help other users.

Moderator: Martin

Post Reply
crackers8199
Posts: 14
Joined: 03 May 2017 18:20

delay on flows that launch app / shortcut?

Post by crackers8199 » 03 Jul 2017 18:20

i have a few flows that i'm using to launch apps or shortcuts from quick settings in nougat, and i've noticed that more often than not there's a pretty noticeable delay (2-3s or more) between the time i hit the button and when the app actually comes up. sometimes the panel also takes a while to collapse. sometimes the panel collapses immediately, but then there's a delay in opening the app. sometimes everything happens instantly as it should. it's very frustrating and i haven't been able to figure out why it's happening or how to fix it? any ideas?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: delay on flows that launch app / shortcut?

Post by Martin » 04 Jul 2017 19:28

Hi,

Please check the log to see if the delay happens before or within the flow (open the flow list and select menu->Manage->Log). The log shows a few lines for the activated triggers and each action with a timestamp on each line so it should be possible to isolate the cause.
Please send the log to me (menu->Manage->Log, menu->Send Log: info@automagic4android.com) if you have troubles to find the cause.

Regards,
Martin

crackers8199
Posts: 14
Joined: 03 May 2017 18:20

Re: delay on flows that launch app / shortcut?

Post by crackers8199 » 05 Jul 2017 02:02

It looks like it's happening before the flow is executed...so the hang up seems to be that there is a delay from when the quick settings tile is pressed to when automatic runs the flow. Once the flow runs, everything happens almost instantly as it should.

I can also confirm that when I execute the flow manually from within automagic, it runs everything instantaneously.

crackers8199
Posts: 14
Joined: 03 May 2017 18:20

Re: delay on flows that launch app / shortcut?

Post by crackers8199 » 05 Jul 2017 07:22

Also interesting is that quick settings tiles that don't launch a shortcut seem to work instantly. I have one that flips the screen 180 degrees since my car charger is above the mounting location, and that one works just fine...it only seems to be the ones that launch a shortcut that often exhibit this delay.

crackers8199
Posts: 14
Joined: 03 May 2017 18:20

Re: delay on flows that launch app / shortcut?

Post by crackers8199 » 05 Jul 2017 23:33

i've done some more digging and found that this may be a bug in oxygen os. any automagic tiles that i move into the first five (so they show on the notification shade without having to expand the full quick settings) work instantly. any that i run from the expanded quick settings (including any from the first five) now sometimes take 2-3 seconds or more before running their action.

i'll see if i can reproduce on my old nexus 6, running stock 7.1.1, to see if this is a bug in oxygen os or if maybe this is something wrong with stock android itself.

crackers8199
Posts: 14
Joined: 03 May 2017 18:20

Re: delay on flows that launch app / shortcut?

Post by crackers8199 » 05 Jul 2017 23:54

just checked on my old nexus 6, and the issue is present there as well. so, if this is in fact a bug, it's a bug in android as a whole...not just oos. any ideas if there's a way to potentially work around this?

edit: just now i was able to reproduce it using one of the first five tiles, so it seems that's not definitively the answer. it's definitely not nearly as prevalent when using the basic row of tiles, but it does still seem to happen occasionally.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: delay on flows that launch app / shortcut?

Post by Martin » 06 Jul 2017 20:20

On a Pixel XL it seems to invoke shortcuts more or less immediately. I've build a simple test flow that executes a vibrate action and then launches a shortcut to show a certain contact. The vibrate is executed immediately and the contact is also shown without noticeable delay. I've used tiles in the first row and on the second page without any issue. Could you please also make the same test?
I guess the system does not send the required event to Automagic immediately for some reason. In this case the log of Automagic would not indicate any delay since the trigger simply does not get informed immediately.
Maybe also try to disable all battery saving features in the system settings for Automagic and enable the accessibility service of Automagic to increase the priority of Automagic a bit.

Regards,
Martin

crackers8199
Posts: 14
Joined: 03 May 2017 18:20

Re: delay on flows that launch app / shortcut?

Post by crackers8199 » 11 Jul 2017 16:28

Martin wrote:On a Pixel XL it seems to invoke shortcuts more or less immediately. I've build a simple test flow that executes a vibrate action and then launches a shortcut to show a certain contact. The vibrate is executed immediately and the contact is also shown without noticeable delay. I've used tiles in the first row and on the second page without any issue. Could you please also make the same test?
I guess the system does not send the required event to Automagic immediately for some reason. In this case the log of Automagic would not indicate any delay since the trigger simply does not get informed immediately.
Maybe also try to disable all battery saving features in the system settings for Automagic and enable the accessibility service of Automagic to increase the priority of Automagic a bit.

Regards,
Martin
i've created a video to show exactly what i mean. notice how the first time i press nova settings, it comes up instantly...but the second time, there's a noticeable delay. the delay (on my phone anyway) happens much, MUCH more often than not.

https://www.dropbox.com/s/xte35gk3de5q2 ... 7.mp4?dl=0

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: delay on flows that launch app / shortcut?

Post by Martin » 11 Jul 2017 20:52

I was able to reproduce the problem by using a QS tile to show a contact, press home (not back), immediately try to execute the same shortcut again with the QS tile. When waiting a few seconds on the expanded QS tile drawer, the problem goes away for some reason. I still think that this delay is caused by Android itself but I will try to search a workaround.

Regards,
Martin

Post Reply