How to ignore flow when wifi is set ON by user

Post your questions and help other users.

Moderator: Martin

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 18:16

What happens now is that my flow is disregarded totally. When the widget turns form red to green the wifi closes by itself. When it turns green the wifi does not open. If the wifi is open, the flow cannot shut it down
TheBrain1984 wrote:You also need to initialize a var named "global_low" with a value of 0 (or below). I set this var in my flows to 1 or above if my energy gets lower than 15% and in that case the global_low var don't let you switch on the WiFi (with the WiFi module)
I don't understand what you mean by that. What I did is that I use condition that battery must be over 7% otherwise wifi is OFF.

I really have to thank you for your help. I thought that the whole process would be simpler. My goal was to ask for help for the wifi and later adapt it by myself for the mobiledata and bluetooth.
It turns out to be a nightmare for me. I think I will give up.

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 19:02

If you don't have a var "global_low" with a value of 0 or below and the indicator turns green than the WiFi will always be getting closed by the module, because the module "thinks" you have not enough energy left. So you really really need this var with a value of 0 (or -1, -2,...). If the indicator turns green, Automagic gets the control over the WiFi, so if your WiFi is on (with a red indicator) and a flow tries to switch off (by setting the var global_set_wlan to 0) it can't because the module is "locked". If tap on the widget now the indicator turns from red to green and Automagic gets the control and because of global_set_wlan is 0 the WiFi will turn off.

Maybe you can share your flow and I will have a look at it.

P.S.: I have the same kind of module for Bluetooth and MobileData

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 19:59

I attach the flows...once more thank you !!

ps
if wifi problem is resolved I will definitely need your module for Bluetooth and MobileData

edit
I found something that could help
http://automagic4android.com/forum/view ... flow#p3847
but I don't know how implement this solution either
Attachments
flow_MobileData_copy_20150121_153718.xml
(9.33 KiB) Downloaded 721 times
flow_WiFi_copy_20150121_205228.xml
(5.57 KiB) Downloaded 699 times
flow_Bluetooth_20150121_205257.xml
(9.26 KiB) Downloaded 705 times

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 22:09

I double checked it now and in my opinion it should work but just to make sure I added an action to initiate the var global_low. So if you execute the flow once you can delete that action, if it still doesn't work I have no idea why.

http://automagic4android.com/flow.php?i ... c763d806fe

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 22:41

it did not change anything, unfortunately...
BUT!!! at least now the wifi won't shut down by itself, so I am happy with that.
You mentionedthat you have solutions for the BT/MobileData. Is it possible to help me there as well?

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 23:24

I found it. The module doesn't start if the value of the var doesn't change. So if you switch on the WiFi manually and "change" global_set_wlan from 0 to 0 it won't be shut down by Automagic, but this should solve the problem.
http://automagic4android.com/flow.php?i ... eb4169201a

BT and MD I'll send tomorrow.

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 23:40

this is almost perfect now!! the only (minor) issue that the widget itself does not start wifi...all other functions are OK!!
I am waiting for the rest tomorrow.
thnx

edit
It is working like a charm!

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 22 Jan 2015 16:16

Good point, I'll implement that it would ask you, when you get control if you want it on or off. For MD and BT the modules are not genreally enough to post it now, I'll make modules that will work like the WiFi Module (+ the question if on or off if the "user" gets control"). I think I'll post everything this evening

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 22 Jan 2015 17:23

I redesigned the WiFi-module a liitle bit and published it in the flow sharing area. The MD-module is also ready to be downloaded. ;)

EDIT: BT module also published and thanks for the compliment.

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 22 Jan 2015 20:41

TheBrain1984 wrote:I redesigned the WiFi-module a liitle bit and published it in the flow sharing area. The MD-module is also ready to be downloaded. ;)

EDIT: BT module also published and thanks for the compliment.
I tested all of them. Everything is OK. I have just a few minor issues.....
1. Some stuff is in German. However if you open and close, you are prompted to save and the language changes automatically.
2. The first time I ran the flows I saw the massage "Error. Option does not work prior to Android version 4.2......". However I noticed nothing wrong
3. Some cosmetic changes to the widgets :lol:

Excellent job!!

Post Reply