How to keep a flow with bluetooth always running?

307 views
Skip to first unread message

drsprite

unread,
Jun 21, 2023, 9:30:52 AM6/21/23
to Automate
Hi, I am new to Automate Premium. I'm trying to send an app intent when bluetooth is connected. This works great, but the flow ends once done. I'd like to keep the flow active so that when I connect to that bluetooth device again in future it'll be active and ready. 

When I do a loop back to the top of the flow, i end up in an endless loop of sending the app intent which isn't what i want. 

Any thoughts?
Start GPSLogger when in car.png

Henrik "The Developer" Lindqvist

unread,
Jun 22, 2023, 3:20:48 PM6/22/23
to Automate
The OK path on last block (#5), should connect back up to IN on the Bluetooth device connected block (#2), creating a loop.
The flow should not loop continuously, "sending" intents, as long as the Bluetooth device connected block has it's Proceed option set to "When changed". If it does, then it must be a bug in the Bluetooth device connected block, or the Android API it relies on.

drsprite

unread,
Jun 22, 2023, 3:42:08 PM6/22/23
to Automate
I don't see a "When Changed" option in the bluetooth device block. Only Immediately and When connected. 

If I choose "When connected", then it is surely looping. The toast message disappears and comes back within a second of the previous one. 

Henrik "The Developer" Lindqvist

unread,
Jun 23, 2023, 6:38:42 AM6/23/23
to Automate
Sorry, i through it was the Bluetooth device connected block, not the Bluetooth device connect block.
Your flow "does" something, it connects to a Bluetooth device then send some broadcasts, but it doesn't tell when it should do so.
For example, if you want it to do so every hour, then append a 1h Delay block and make the flow loop.

drsprite

unread,
Jun 23, 2023, 9:29:02 AM6/23/23
to Automate
Oh I see. I think I used the wrong Bluetooth block. I don't want to connect to a device. I want to start a flow when a device connects. I'll update it with "Bluetooth device connected" block and see if that is what I'm looking for

UNITED POLICE STATES OF AMERICA

unread,
Jul 6, 2023, 7:28:56 PM7/6/23
to Automate
I can help. I wrote a couple of flows that start an app when I connect my bluetooth game controller. One also forces the screen orientation, but both run continuously.Screenshot_20230706-162243_Automate.pngScreenshot_20230706-162258_Automate.png

UNITED POLICE STATES OF AMERICA

unread,
Jul 6, 2023, 7:35:15 PM7/6/23
to Automate
Look at the lower one. You can drop the keep device active block, the important thing is the way the NO on is device connected, and the output from the app start block loop back to the device block. That keeps it alive. 

UNITED POLICE STATES OF AMERICA

unread,
Jul 7, 2023, 1:17:20 AM7/7/23
to Automate
I have a little problem I think Automate can solve, but I don't know how to go about implementing it. My game controller is too sensitive for a part of a game I'm playing, and I'm stuck. I need to reduce the rate of the analog sticks by at least 50%. I think Automate can do it, but I don't know how to do it.

P. Andreas Schmidt, IVE

unread,
Jul 7, 2023, 12:40:00 PM7/7/23
to Automate
Isn't that something you'd fix by adapting settings either in the controller driver/software or the game itself? And if you want AM to do it at a certain moment, without leaving the game... you'd have to figure out a way to get AM to do it at the right moment...? And if it is some system setting, you can use the "find system setting" stock flow that comes standard with AM, to figure out which it is, and so get AM to do it. If it is a setting of the game itself, there won't be a way for AM to do it - perhaps with root...but even then... At least as in directly changing it, and not using interactions to click through the settings, which is not what you need.
Have you googled for this, for your concrete controller using it on android, to achieve that?

UNITED POLICE STATES OF AMERICA

unread,
Jul 26, 2023, 9:35:19 PM7/26/23
to automa...@googlegroups.com
My solution was to get a different game controller, and I'm actually pretty happy with it. It's got an app that adjusts every aspect of it. At first I thought it was some kind of keymapper, in fact, it's called "Keylinker", but I found that isn't the case at all. It's a programmer, since I can also use it on my pc, and the changes I make to the settings persist. Cool, I like it even more, now. But I found that I set it up differently not just for different games, but even playing the same ones on the different platforms. I already wrote a cool, and useful flow that starts a game (or a launcher that I put all the games I play on) whenever the controller connects, and figured it would be really easy to port it to start the Keylinker app when the new controller connects. Well, maybe not so much. The problem is that Key linker has about 100 different "activities", none of which say anything like "just start the damn thing like the shortcut does", and if I have to try them all until (hopefully) I find the one that works, it will take me weeks of work. And Automate is really picky about this. So far, it's the only complaint that I have with it.


--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/69f62439-0942-42bc-b860-3ff8da29108en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages