Matt
Matt
> While widgets are indeed a possibility, I'm really prefering a more automated way, if possible.
H,mmmm... not sure who is not getting what.... I had actually made the same recommendation as Bob on your first post about this subject. Not sure what happened to that post..
Anyway .. you stated you need a way to tell if have have "manually " set your data off. So this part is not a automated.. How do you manually turn your data off?? Bob is simply suggesting using a widget to Manually toggle your data instead of the way you are manually doing it now. I would think this would be the best place to tell if you are manually turning off your data.. IMHO...
Rich...
> Ah, right.. Well.. I have this fine quicktoggle in my notification dropdown, which I'd like to use.
Ahhh, got it. And I assume this pull down Has other options in it as well and you would not want to replace it with a tasker notification.
> The problem right now is that even when data is "on", I have given it some secs before it actually turns on after the screen is on, so that it wont activate when im just taking a look at the clock etc, but when I do that and turn off the screen again, the screen off profile thinks that data is off and then reacts as if I had turned off data myself. So I need a way to avoid that.
>
For this I think I would try using a exit task in your screen off profile. Set another global variable two %TIMES. And then test that global variable against %TIMES in your enter task to tell if the screen has only been on for a few moments.
Rich..
I don't mind helping at all.. But I think it would be best if you could post all of your relevant profiles To this topic So we can see what you have so far ..
Long press on the profile name / ( 3 dot menu with 4.0+ ) export / export description to clipboard (not XML)
The beginner mode needs to be off and the profile needs to have a name to be able to export.
It would be better if you could export "description " to clipboard and paste it here..
--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Of the profiles not the project.
*,MobileDataOn,*
Profile: Screen Off (36)
Event: Display Off
Enter: Anon (35)
Abort Existing Task
A1: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A2: If [ %MOBILEDATA ~ on ]
A3: Variable Clear [ Name:%SCREENSTATE Pattern Matching:Off ]
A4: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A5: Stop [ With Error:Off Task: ] If [ %SCREENSTATE ~ ON ]
A6: Stop [ With Error:Off Task: ] If [ %POWER ~ ON ]
A7: Stop [ With Error:Off Task: ] If [ %KEEPALL ~ ON ]
A8: Mobile Data [ Set:Off ]
A9: Vibrate X [ Time:449 ]
A10: Else If [ %MOBILEDATA ~ off ]
A11: Stop [ With Error:Off Task: ]
A12: Vibrate X [ Time:1000 ]
Matt
Matt
Matt
I absolutely agree with Matt. I do not think the path you are heading down will give you a reliable profile for what you want to do. I am not sure if you realize what tasker is capable of as far as using the notification bar goes. I would imagine that what ever your quick toggle notification does tasker will be able to do exactly the same and probably more. If you replace the notify toggle with a tasker notification you will be able to customize it and add other features like a quick screen brightness setting as a example.
@ Matt, your notification approach sounds interesting but i do not exactly understand how it would work.. do you mean that after the notify bar is pulled down then a scene would be displayed over just the data toggle notification? That does not seem correct as the notifications will change positions. I am sure I am missing something...
So after all that said... if we are still going down the same path..
> :( ... There really isn't a way to only allow a profile to be active when the screen has been on for a certain amount of time?
I am starting to get confused as to what you are looking for. I thought your screen off profile simply set a variable to indicate if mobile data was off when the screen went off which we are assuming the mobile data is off because you turned it off manually . The profile you posted turns mobile data on and off as well as clears a variable. What is the name of the variable you set to tell if mobile data has been set manually..
Rich..
Hey Bob, thanks for the reply. You're not quite right about what I want. I'm actually looking for a way to avoid the data check when I've turned data off manually. Like if I wanna go a day without recieving or sync'in at all, then I can just turn data off and not worry. However if I turn it on then it will automatically turn off/on when screen off/on and while the screen is off do the data checks. All this in order to save battery.
Matt
Ahhhh, Thanks Matt... I think I misunderstood what these toggles are and how they work, as I do not have them. Could you please explain them a little better for me. I thought it was just a notification that when clicked on would open up a entire menu of options.
Is this a option on the device or third party app?
Can you turn them off?
Do they have a regular notification in the collapsed notification bar?
Thanks, Rich..
Rich, I assume that the toggles are in a fixed location, as they are on my phone (at the top before the list of notifications). If not, then this would also be a non-starter.
Matt
> I'm trying to see whether I could just make the Datacheck run a couple of minutes after the screen has been turned off
That's the easy part. I understand that..
and do the first data check already there,along with then turning "data off" again
I do not know what you are saying there..
It may just be an idea that only makes sense in my head,
Perhaps....
maybe, but I'll fiddle around with it a bit.
OK...
@Matt, I like your overlay idea but how were you going to trigger it? The only thing I can think of would be a window value but on my device I get the default " verizon wireless " for a value when the notification is pulled down..
Rich..
Thomas, if you are still interested in getting a reliable way to test for " I have set my mobile data with my notify toggle" there may be a simple reliable solution if your device shows a unique window value when the notification bar is pulled down. To test the window value build this profile then pull down your notification bar and see what is flashed. To turn it off just disable the profile then save out of tasker..
Profile: Win (381)
Event: Variable Set [ Variable:%WIN Value:* ]
Enter:
A1: Flash [ Text:%WIN Long:Off ]
Rich..
Oops.. forgot to tell you, you will need to select tasker in your android accessibility settings for this to work.
> Seemed like a good idea but sadly the notification bar, when pulled down, shows an empty window value
By empty do you mean %WIN?
:( ... Empty or "WiFi" right after. Because the WiFi button is the first one in the toggles.
>
> Still got a chance?
Sounds promising .. exactly what happens when you pull down the bar?
Do you get a %WIN then 'WIFI' before tapping anything or you get the "WIFI' after pressing the toggle?
Matt
> Empty: just an empty box.
Strange.. I have never got that as a window value. Must be ROM related I would guess..
Then right after a box pops up with "WiFi".
Now this is good news.
What happens when you press the wifi toggle? What values do you see
My assumption would be the notification bar collapses and you are back to whatever windows you were at before the bar was pulled down and It simply flashes the value for that window... let me know if it is something different.
Here are 2 options so far
1. Matts Idea ... trigger on %WIN and the display a transparent scene over the wifi toggle. Probably the most reliable..
2. I am assuming you made the profile Matt recommended with context state -> net -> mobile network. You could have a profile that triggers on %WIN when the notification is pulled down then in the exit task set a variable %Timeofpress = %TIMES. And another variable %Wifipressed = 1
Then in the mobile network profile add a context variable set %Wifipressed =1 and in a enter task clear %Wifipressed check how long it has been since %Timeofpress has been set . If it has been less than 2 or 3 seconds ( or however long it takes your mobile network to connect) then set %WIFI_WAS_MANUALLY_TURNED_ON. = on
else clear %WIFI_WAS_MANUALLY_TURNED_ON.
Then you will have to make an exact copy of that profile only in the mobile networks context select "not" and you would set %WIFI_WAS_MANUALLY_TURNED_ON = off
This can fail if you toggle mobile data when you do not have a connection
I actually thought option number 2 was going to be a lot simpler than that when I started typing it. It should work but will definitely be less reliable than option 1. So my recommendation would he to go with option 1. You would have to build a scene but I do not think this one would be all that complex.
Rich..
Matt
> Remember, it's "data" that I'm trying to manage, wifi is just the window label that pops up when notification menu is down..
Yep, got that..
. I'm onto what youre saying here though.. But it still confuses me a bit because what I'm trying to do is to make data stay on (but still turn off when screen is off and after that do regular data checks and then turn itself on when screen on again)
You already have a profile that does this and it works with the expectation of you manually turning the data off. Correct?
until I turn it off myself. When I've turned it off myself then it must not turn itself on or do data checks etc.
This is what I thought we have been trying to solve all along. Correct?
>
> How do I use my %WIN profile to this?
The %WIN is merely a way to tell if you have pulled down the notification bar. Once we know that we are that much closer to knowing you have tapped the data toggle.
However, I believe I have found option #3 and it may prove to be much simpler. I was poking around shell / dumpsys connectivity. This is a shell command that will return all sorts of system information. I found that when the mobile data is enabled or disabled android reports a "reason " for why it has been enabled or disabled. What I have found so far is that if I turn off mobile data with tasker the reason is "dataDisabled" and if I use airplane mode the reason is "radioTurnedoff" I have not been able to test for no signal yet ( I can't seem to block the signal at my home) I may need some help getting the proper way to extract this info from the dumpsys command but I believe you will be able to go back to matts original idea of simply checking if data is off immediately after screen goes off and check the dumpsys to see if was tuned off by "dataDisabled"
I will try to put a simple profile together for you so you can test these values on you device. It might take me a little while as I am not a shell expert by any means and I will be a little busy tonight.
Here is the block from dumpsys connectivity that I am referring to..
Active network: mobile
NetworkInfo: type: mobile[CDMA - eHRPD], state: CONNECTED/CONNECTED, reason: dataEnabled, extra: VZWINTERNET, roaming: false, failover: false, isAvailable: true, IpVersion:0
Mobile data state: mobile, CONNECTED
I think i can get it with some crude variable splits but I know there is a more elegant way with shell...
Matt
OK try this profile...
It should flash the "reason" every time your data is turned on or off. What we are looking for is the flash that happens when you use your data toggle and it should be different than using airplane mode or loss of signal. It would be interesting if it is different than the tasker action to turn mobile data on / off. I have set the final output to the variable %Adumpsys so you can check the exact value we are looking for in the variables tab.
Your device might give different data in dumpsys connectivity. So if you do not get the desired results I would change all of the variables %dumpsy to %Dumpsy (to include %dumpsy2 and %dumpsy21) in the task. This will allow you to view the variables in the variables tab. You should be able to find something similar to the block I previously posted in %Dumpsy And then try to figure out how to split it out.
Profile: Mobile Data Change (229)
State: Mobile Network [ 2G:Off 3G:On 3G - HSPA:Off 4G:Off ]
Enter: Get Dumpsys (183)
A1: Run Shell [ Command:dumpsys connectivity Timeout (Seconds):0 Use Root:On Store Result In:%dumpsy Continue Task After Error:On ]
A2: Variable Split [ Name:%dumpsy Splitter:reason: Delete Base:Off ]
A3: Variable Split [ Name:%dumpsy2 Splitter:, Delete Base:Off ]
A4: Variable Set [ Name:%Adumpsys To:%dumpsy21 Do Maths:Off Append:Off ]
A5: Flash [ Text:%dumpsy21 Long:Off ]
Exit: Get Dumpsys (183)
A1: Run Shell [ Command:dumpsys connectivity Timeout (Seconds):0 Use Root:On Store Result In:%dumpsy Continue Task After Error:On ]
A2: Variable Split [ Name:%dumpsy Splitter:reason: Delete Base:Off ]
A3: Variable Split [ Name:%dumpsy2 Splitter:, Delete Base:Off ]
A4: Variable Set [ Name:%Adumpsys To:%dumpsy21 Do Maths:Off Append:Off ]
A5: Flash [ Text:%dumpsy21 Long:Off ]
Let me know what you get for results.
> I hope I'm doing this correctly.
Looks correct..
>
> When the profile is active and I enable data manually it says "apnSwitched"
This one is the only one I am com fused by... I would expect "dataEnabled" could you test this one a few more times...
and when I disable it, it says "dataDisabled".
>
> I can't really test signal loss
This is a important one to get. You need to find a led lined room... :)
but airplane mode, when on, says "radioTurnedOff" and whenn off it says "simLoaded" when on.
That looks correct as well
>
> I made a simple tasker profile that turns data off/on and the values it flashed were the same as if I was to do it manually.
It looking very promising. I will not be available today ( I will actually have to earn my paycheck today..) but you can try to incorporate this in your existing profiles as I briefly outlined before.. let me know where you get hung up.....
> "apnSwitched" is really the only one I can get.. no dataEnabled... Very weird.
I think that's fine as long you do not get this value for any other connect/ disconnect..
which makes my connection drop for a couple of seconds too. While it did so a notfication popped of with "(unspecified)"
That looks like it... :)
I finally had a chance to test some of these values. Using this method still will not be as reliable as that Matts transparent scene option.
What I found was the following..
1. If data is enabled
2. Data gets disabled by loss of signal
3. You manually toggle data off.
4. Now data will remain off even if the signal is restored, however the reason will still be set for loss of signal.
With the exception of the above scenario I believe it will work for what you are looking for. If it were me I think I was still go with the Transparent scene method.
However this should be fairly simple to integrate into your existing profiles and you could use it until you at the time to build a scene.
Rich..
> Those occasional signal loss wouldn't be a big deal. I'm not that dependant on having internet connection all the time, so it's ok. Have you also tried with data check, etc?
No, I do not use a data checker, I just leave my data on all the time.
Seems like I screwed my own up, somehow.
You would need to post your data checker and all relevant ( any profile or task that sets variables used by the data checker) profiles and tasks. Along with a detailed description of what it is supposed to do..
Rich..