Wifi toggle, no Helper app, no ADB hack

barrelman

New member
New MacroDroid user, new phone: Pixel 6a [non-rooted], MacroDroid Pro [stock, no Helper app, no ADB hack], Android 13.

I don't think I've done anything here that other MacroDroid users haven't already done something very similar, but I was not finding any specific macro templates. I did find one macro in the templates that caught my eye:
'WiFi On/Off QS tile' posted by jan
It showed that there is still some useful WiFi functions even without the Helper app, namely the constraints 'WiFi Enabled' and 'Wifi Disabled'.

Then I found the excellent YT video 'What is Quick Setting Tile? | How to Configure It? [Tutorial]' by ·MacroDroid - Device Automation·.
So I setup 'MacroDroid tile 1' and called it 'Wi-Fi' even before I wrote the macro. I put it under the 'Bluetooth' tile:

Screenshot 2023-04-23 122900.jpg

Then with a little trial and error, I created a new macro called 'Wi-Fi tile'. It's not very complex at all, it does have UI Interactions, but no gestures, just clicks:

Screenshot 2023-04-23 130419.jpg

Please see the macro in the Templates in the MacroDroid app - 'Wifi toggle, no Helper app, no ADB hack'

This works on my Pixel 6a [Android 13], hopefully it will work on yours. You may have to tweak the wait times and UI Interactions for your phone.
 

Endercraft

Moderator (& bug finder :D)
Just a question. You are using a tile... to click another tile ?! I don't really see the point...
 

barrelman

New member
It guess it saves 1 click. Otherwise, you have to click the 'Internet' tile then the WiFi toggle switch. I still like the look of the separate 'Wi-Fi' tile [does it not look nice]. But, I think, it's real usefulness is it can be used in other macros when you want to toggle WiFi off or on, for those of us who don't have the Helper app or ADB hack [whatever that is]. For example:
Actions
Expand Status Bar
Wait 1 second 250 ms
UI Interaction
Click [Wi-Fi] 'same as running Wi-Fi tile macro
Wait 250 ms
Collapse Status Bar
 

Endercraft

Moderator (& bug finder :D)
It guess it saves 1 click. Otherwise, you have to click the 'Internet' tile then the WiFi toggle switch. I still like the look of the separate 'Wi-Fi' tile [does it not look nice]. But, I think, it's real usefulness is it can be used in other macros when you want to toggle WiFi off or on, for those of us who don't have the Helper app or ADB hack [whatever that is]. For example:
Actions
Expand Status Bar
Wait 1 second 250 ms
UI Interaction
Click [Wi-Fi] 'same as running Wi-Fi tile macro
Wait 250 ms
Collapse Status Bar
So this tile is a tile that contains all Internet related settings then - like a folder tile. I never heard of such tiles but I guess I'll thank you later if I ever have one of those devices ;)
 

Endercraft

Moderator (& bug finder :D)
Screenshot 2023-04-23 130419.jpg
A way to include the whole macro in a screenshot is to tap the 3 dots in the upper right corner and tap 'Share as Image'. This will then create an image of the whole macro. If your device lets you, you can also create a 'long screenshot' to include the whole macro.
 

barrelman

New member
A way to include the whole macro in a screenshot is to tap the 3 dots in the upper right corner and tap 'Share as Image'. This will then create an image of the whole macro. If your device lets you, you can also create a 'long screenshot' to include the whole macro.
Thanks for that tip. It took me a while to stack 3 separate images and then do a snip. I'm new to MacroDroid.
 

barrelman

New member
So this tile is a tile that contains all Internet related settings then - like a folder tile. I never heard of such tiles but I guess I'll thank you later if I ever have one of those devices ;)
Now... Now, I don't know anything about that, but...
It's a 'Wi-Fi' tile that toggles the Wi-fi off and on. I think for me and other users, it's useful, because the way my Android is configured [switches to cellular automatically] the 'Internet' tile is always on [lighted], either the cellular icon or Wi-Fi icon, but always on. So with the 'Wi-Fi' tile I get a quick visual on the first 'Status Bar' screen of whether or not Wi-Fi is on, saving 1 click. I have written a macro that turns Wi-Fi and Bluetooth off when the Wi-Fi in my truck is out of range. It does work but I discovered I had to add a longer wait after the Click [Wi-Fi] action [1 second 500 ms] to allow the 'Wi-Fi' tile macro time to complete. Now I need to create a macro that turns the Wi-Fi and Bluetooth on when I get back to the truck [maybe a 'Floating Button']. This would save 1 swipe and 1 click.
 
Last edited:

dhj49er

Well-known member
Now... Now, I don't know anything about that, but...
It's a 'Wi-Fi' tile that toggles the Wi-fi off and on. I think for me and other users, it's useful, because the way my Android is configured [switches to cellular automatically] the 'Internet' tile is always on [lighted], either the cellular icon or Wi-Fi icon, but always on. So with the 'Wi-Fi' tile I get a quick visual on the first 'Status Bar' screen of whether or not Wi-Fi is on, saving 1 click. I have written a macro that turns Wi-Fi and Bluetooth off when the Wi-Fi in my truck is out of range. It does work but I discovered I had to add a longer wait after the Click [Wi-Fi] action [1 second 500 ms] to allow the 'Wi-Fi' tile macro time to complete. Now I need to create a macro that turns the Wi-Fi and Bluetooth on when I get back to the truck [maybe a 'Floating Button']. This would save 1 swipe and 1 click.
Controlling WiFi by clicking a tile is one way of using MD to automate control....but it is limited to screen on.
MD is capable of fully automating the tasks you describe above with no user intervention with the screen on or off.
Installing the helper and running the few ADB hacks for the 2 apps opens up a lot of capability.....there are threads that describe how to run the ADB hacks. It's well worth doing.
 

Dimlos

Well-known member
@dhj49er
I too think it would be more convenient to use ADB hacks and plugins, but it's okay for some people not to use them.
I think this thread is information for those who don't want to use them.
 

barrelman

New member
I was very wary of installing either the Helper app or ADB hacks. After all, I don't have any other apps on my phone that I have to do something like that. So I set out to try to toggle the Wi-Fi off and on with UI Interaction. I did stumble on to the Wi-Fi tile idea from jan's 'WiFi On/Off QS tile' macro and thought it would look nice on my QS. BTW, I've written the macro for turning Bluetooth and Wi-Fi back on when I get back to my truck. I decided I hate the 'Floating Button' [it's always in the way], the 'Widget Button' is much better. Everything seems to be working. Probably some day I will install the Helper app and ADB hacks, but for now, I'm enjoying the capabilities of MacroDroid w/o them. Thanks for acknowledging that the real usefulness of the macro is it can be used in other macros when you want to toggle Wi-Fi off or on.
 

dhj49er

Well-known member
....... Thanks for acknowledging that the real usefulness of the macro is it can be used in other macros when you want to toggle Wi-Fi off or on.
....providing the screen is on.

Just so other users know the usefulness is limited.
 

Endercraft

Moderator (& bug finder :D)
The title is misleading indeed. It would be better renamed to something like 'Wi-Fi toggle with 1 tile'.
 

barrelman

New member
Sorry for the title, I duplicated it on the Templates too. UI Interaction is cool to play around with but the screen on thing is kind of a bummer. My phone has no screen lock. I added a 'Screen On'' before the UI Interactions in my macros but I don't know if it even does anything for me. Maybe it does work only because I have no screen lock.
 

barrelman

New member
Both my macros to turn BT and WiFi off and then back on do seem to work. I was using SSID in range / out of range but have abandoned that for the IP address change trigger just today. I have to see how it works but my macros never work right at first, there's always something you didn't think of.
 
Top