[Question] Set start date of Androids mobile data plan overview - Tasker Tips & Tricks

Hey,
I've an mobile data plan that restarts every 28 days. Therefore the time range of one month in the default data plan overview of Android doesn't fit for me.
Does anybody know if it's possible to change the start date of the default data plan overview with Tasker? My idea is to run a task every four weeks, which sets the new start date to the date of the current day.
I'm not an Android expert but I guess it's possible with this function: https://source.android.com/devices/tech/connect/data-plans
Thanks
Jas

Related

cellGPS for Windows Mobile? Upload GSM cell-id on periodic basis to HTTP server?

I'm looking for a simple application that will run in the background, and send the current GSM/UTMS cell-id to a web server on a periodic basis (via HTTP GET).
Basically a program like cellGPS (http://www.vikinggames.hu/product.php?id=11) but for Windows Mobile. I don't really care about GPS info, since that just sucks power (and doesn't work indoors).
What I'm trying to do here is enable my home automation system to know where I am, without sucking my phone's battery to death (especially since GPS won't work indoors). GSM/UTMS cell-id is 'close enough' for me.
The application would just hit a webserver on my home machine with the current cell-id (http://webserver.com/receiver.php?cellid=4233-23) on a definable period. My own app on my webserver would record that data into a database. I can then go back and use that data to let my home auto system know "hey, Justin's almost home, turn on the HVAC, lights, etc".
It needs to be able to run in the background, no annoying icons on the screen, and start up on phone reset.
I figure since it's just sending the cell-id (which is always available), it would be rather efficient and not use much battery power (especially since I usually leave Activesync on "instant" so the data connection is usually up anyway).
Other extensions to this would let my server update twitter/facebook/etc with "Justin's at ... home/work/etc now.".
Any ideas?
wow this would be a great aplication
Two programs come to mind.... Comm Mgr Pro and rk-Location Switch.
I have not really played with these two programs much, but they do Cell tower based switching and might include some of the other features you require (but I do have to admit that they do not have all the features you want).
Dale Lane posted some c# code to programmatically get the cellID of the current tower.
The rest is pretty simple - a place to enter the url and then periodically issue HTTP GET requests.
I guess I could try to cook up something when I have some time.
Well I went and coded a sample app anyway. It just reads the current tower info at the specified interval. Is this the information that you require?
Just extract the zip to the device and run the .exe.
Note: It requires .NET Compact Framework 2.0
this sounds pretty cool. remember that cellid information is good for triangulating to about 1000 meters. you can get "justin's on his way home, turn on the AC" but probably not "justin's in the shower, begin youtube upload"
newb5000 said:
Well I went and coded a sample app anyway. It just reads the current tower info at the specified interval. Is this the information that you require?
Just extract the zip to the device and run the .exe.
Note: It requires .NET Compact Framework 2.0
Click to expand...
Click to collapse
Works great! even though this topic was supposed to be on logging it to a web database, I am not too keen on that since data charges are expensive. I would be more interested in an internal database where I can simply attach a "friendly name", say the location of the site (ie. corner of main and first st.) to some cell sites (or a group of sites) in the internal database. Similar to what nicetrack used to do on previous WM versions. http://forum.xda-developers.com/showthread.php?t=320055
newb5000 said:
Well I went and coded a sample app anyway. It just reads the current tower info at the specified interval. Is this the information that you require?
Just extract the zip to the device and run the .exe.
Note: It requires .NET Compact Framework 2.0
Click to expand...
Click to collapse
I will check as soon as I get my Kaiser back -- I managed to shatter the screen over the weekend. doh. This sounds EXACTLY like what I'm looking for.
Someone else mentioned data charges, which I don't care about, since I'm on unlimited data (AT&T won't even sell the things without the unlimited data plan now).
Actually, I still have my older TyTN somewhere. Let me dig it up and give this a try.
jasonchan said:
Works great! even though this topic was supposed to be on logging it to a web database, I am not too keen on that since data charges are expensive. I would be more interested in an internal database where I can simply attach a "friendly name", say the location of the site (ie. corner of main and first st.) to some cell sites (or a group of sites) in the internal database. Similar to what nicetrack used to do on previous WM versions. http://forum.xda-developers.com/showthread.php?t=320055
Click to expand...
Click to collapse
There's a program that sort of does this now, called Trackme -- but it only does GPS as far as I know. Adding DB code would probably add a whole lot of complexity (and CPU power).
I'm sure it's doable, though, but I would hope it wouldn't be in this app. I have enough crap running in the background eating precious CPU cycles.
I wish I had a Windows machine to do development on. I'm Mac/Linux only, and don't have access to Visual Studio anymore.. I wrote an app to do this for the iPhone, but it can't run in the background due to SDK limitations. It's annoying that Microsoft hasn't made the WinMo SDK work on other platforms (although I guess Apple is doing that with the iPhone, so I don't have much room to talk).
The "goal" of this desired application is to be as lightweight as possible and offload all processing to a real computer. My phone doesn't need to do all of the work.
I can't imagine this would use much bandwidth, anyway. Even if you updated every five minutes, that's far less than 50kb per day, assuming a 64 byte URL + all HTTP and TCP headers. It'd add up to around 1.5 megabytes a month. I'd bet it'd be closer to 800-900kb/month. That's nothing compared to email/etc traffic. I would hope EU/etc carriers aren't so bad that 1.5mb a month would put you over a limit...
jasonchan said:
Works great! even though this topic was supposed to be on logging it to a web database, I am not too keen on that since data charges are expensive. I would be more interested in an internal database where I can simply attach a "friendly name", say the location of the site (ie. corner of main and first st.) to some cell sites (or a group of sites) in the internal database. Similar to what nicetrack used to do on previous WM versions. http://forum.xda-developers.com/showthread.php?t=320055
Click to expand...
Click to collapse
I tested it yesterday when driving home from work. Tower changes were very frequent during my drive home. But lets say that a HTTP GET request (depending on the length of the URL) is on average 100 bytes. Lets say in a day you switch towers 200 times. That would result in just under 20 kilobytes of data usage in a day. I actually calculated this for myself because I also initially thought that one would get a large bill at the end of the month for data usage, but it would seem that this isn't the case.
One could also limit the web requests to only "bookmarked" Cell IDs.
I like the idea of the original poster even though I cannot see how I could use it personally, since I do not have a home automation system.
Regarding more friendly names - I remember that I had set it up on one of my first phones to receive cell broadcast messages from the towers which included the tower friendly name. Haven't tried since, though.
The data that is made available in Windows Mobile is the following:
http://msdn.microsoft.com/en-us/library/aa921533.aspx
Don't see any friendly names of towers though
I thought of adding a "bookmark" button so that one can bookmark the current Cell ID (and possibly assign a friendly name) but this would be very awkward while driving (and the frequent tower changes).
Google has a database with Cell IDs and uses them in Google Maps but good luck getting a copy of their database
norelidd said:
this sounds pretty cool. remember that cellid information is good for triangulating to about 1000 meters. you can get "justin's on his way home, turn on the AC" but probably not "justin's in the shower, begin youtube upload"
Click to expand...
Click to collapse
Hah!
I only need 1000 meter resolution. GPS is definitely more accurate, but it would kill the battery in 6 hours flat.
Maybe when the third generation of GPS sats start going up in a few years, GPS receivers will use less power (since the sats will be much more powerful and supposedly will reach inside most buildings).. but that's 2015 at the earliest. Who knows what HTC/etc will come out with by then.
jmat said:
I will check as soon as I get my Kaiser back -- I managed to shatter the screen over the weekend. doh. This sounds EXACTLY like what I'm looking for.
Someone else mentioned data charges, which I don't care about, since I'm on unlimited data (AT&T won't even sell the things without the unlimited data plan now).
Actually, I still have my older TyTN somewhere. Let me dig it up and give this a try.
Click to expand...
Click to collapse
Only saw your post after I posted mine.
There aren't any web requests yet though, I just wanted to confirm that I was on the right track (through you testing it ). I'm willing to give it a bash because I'll learn something through the process.
Some questions arise:
Should the app dial a connection automatically, or just not send out requests if there is no active connection?
Still need to figure out how to get it to run in the background properly
I'm wondering how it should function if the phone is in standby
newb5000 said:
I tested it yesterday when driving home from work. Tower changes were very frequent during my drive home. But lets say that a HTTP GET request (depending on the length of the URL) is on average 100 bytes. Lets say in a day you switch towers 200 times. That would result in just under 20 kilobytes of data usage in a day. I actually calculated this for myself because I also initially thought that one would get a large bill at the end of the month for data usage, but it would seem that this isn't the case.
One could also limit the web requests to only "bookmarked" Cell IDs.
I like the idea of the original poster even though I cannot see how I could use it personally, since I do not have a home automation system.
Regarding more friendly names - I remember that I had set it up on one of my first phones to receive cell broadcast messages from the towers which included the tower friendly name. Haven't tried since, though.
The data that is made available in Windows Mobile is the following:
http://msdn.microsoft.com/en-us/library/aa921533.aspx
Don't see any friendly names of towers though
I thought of adding a "bookmark" button so that one can bookmark the current Cell ID (and possibly assign a friendly name) but this would be very awkward while driving (and the frequent tower changes).
Google has a database with Cell IDs and uses them in Google Maps but good luck getting a copy of their database
Click to expand...
Click to collapse
Tower switching will happen quite fast in big populated areas. That's why I was just going for every few minutes and not "as the tower changes".
It's too bad the towers don't "advertise" their GPS coordinates along with the other tower data. It seems like that would have been really easy to stick in the UMTS standard.
I'm surprised Google hasn't open sourced that database, or at least made an API library for it. Afterall, their users are the ones who discovered it all, not them -- Google Maps just records GPS coordinates + cell IDs and uploads them when you run the Google Maps location. I've seen that app upload several hundred kb during some runs.
Going back to the 'post on switch' thing. That might be a neat option -- to send a GET on every tower switch.. I'm going back and forth in my head on if that's a good idea or not. It'd be interesting to see how that hits battery life, though. (Since I have ActiveSync with "always push" enabled, I bet it doesn't make much of a difference).
First beta
Hi guys,
Apologies for the delay - I've been terribly busy.
I managed to create the app so it's ready for testing.
Attached is the cab file. The app consists of two components - the configuration utility and the service. The service is responsible for making the web requests and is launched at startup. You can use the configuration utility to adjust the settings as well as monitor what the service is doing.
The service will automatically dial your data connection when a web update is necessary, but it can also work via WiFi - although I don't see why you would use it via WiFi. It also supports websites that require Windows Authentication (Kerberos or NTLM should work, but do test it).
I think the app should be pretty self explanatory, but please do post if you have any questions or experience any problems.
FIY - the last error (if there is one) is stored in a log file located in:
Program Files\CellID Updater\cidlog.txt
Hope you like it!
EDIT: An update is available on the next page. I'm leaving this attachment as is just for reference purposes, but you should download the one on the next page.
CommMgrPro is creating a very big database automatically with operatorID-Cell/LAC-GPS coords sent (automatically) by the users (they can track their movements in realtime with googlemaps). Obviously GPS coords are only sent by GPS enabled devices. You can change the URL where the data is posted (HTTP GET) to point your site and I can give you a free license. Currently 3000 cells registed with gps coords and growing as the users moves....
Dani
newb5000 said:
Hi guys,
Apologies for the delay - I've been terribly busy.
I managed to create the app so it's ready for testing.
Attached is the cab file. The app consists of two components - the configuration utility and the service. The service is responsible for making the web requests and is launched at startup. You can use the configuration utility to adjust the settings as well as monitor what the service is doing.
The service will automatically dial your data connection when a web update is necessary, but it can also work via WiFi - although I don't see why you would use it via WiFi. It also supports websites that require Windows Authentication (Kerberos or NTLM should work, but do test it).
I think the app should be pretty self explanatory, but please do post if you have any questions or experience any problems.
FIY - the last error (if there is one) is stored in a log file located in:
Program Files\CellID Updater\cidlog.txt
Hope you like it!
Click to expand...
Click to collapse
Hey all - my first post.
I must say, it's outstandingly honorable that you share your skills with us. So good.. (haven't installed the tool yet, hope it's no virus or tv-on/off-switcher)
One question @jmat: How do you process the cellid once it is http'd to your server? Is there a webservice that maps cell-ids to gps?
Frouk
frouk said:
I must say, it's outstandingly honorable that you share your skills with us. So good.. (haven't installed the tool yet, hope it's no virus or tv-on/off-switcher)
Click to expand...
Click to collapse
Thanks and no, it's not a virus / trojan / <insert something bad here>
One thing I forgot to mention is that if the device goes into standby, the service will be "paused". Then, when the device comes out of standby, the service will resume where it left off. I'm not sure whether this is acceptable behaviour for the app, but I considered the alternative - preventing the device from going into standby will drain the battery very quickly. So you would choose when the service should send out updates by taking your device out of standby.
Another thing: you can configure how often the service checks for a new tower and whether it should send out an update if the tower is different or the same since the last check.
I'm still wondering how I can put this app to good use, personally. I don't have a home automation system and I don't need to be tracked by anyone at home. Any ideas on what other uses this app could have?
newb5000 said:
Thanks and no, it's not a virus / trojan / <insert something bad here>
One thing I forgot to mention is that if the device goes into standby, the service will be "paused". Then, when the device comes out of standby, the service will resume where it left off. I'm not sure whether this is acceptable behaviour for the app, but I considered the alternative - preventing the device from going into standby will drain the battery very quickly. So you would choose when the service should send out updates by taking your device out of standby.
Another thing: you can configure how often the service checks for a new tower and whether it should send out an update if the tower is different or the same since the last check.
I'm still wondering how I can put this app to good use, personally. I don't have a home automation system and I don't need to be tracked by anyone at home. Any ideas on what other uses this app could have?
Click to expand...
Click to collapse
The configuration is just perfect - that way one can decide when to update just by letting the device go to sleep or not. Another thing: am I right that this app will never be as accurate as Google maps "my location"? It uses triangular approximation with more than one cell-id, right? I experienced it to be very accurate, even being on the train it exactly locates my position, amazing.
I personally intend to use such kind of app for reality/virtuality games where website visitors can track something or someone on the web and then go outside into the real world and do something or meet someone.
But jmats' idea is also amazing.
Cell name
Years ago I had Ericsson R320 (BTW great phone). It showed cell name e.g. "city centre" on the screen besides op name. I dug up my eric from the closet and this option still works. It would be great to have this as a today plugin Do you know something like that?
Handy Use of App
newb5000 said:
I'm still wondering how I can put this app to good use, personally. I don't have a home automation system and I don't need to be tracked by anyone at home. Any ideas on what other uses this app could have?
Click to expand...
Click to collapse
Maybe you could mount a web server in your home pc (pretty simple) and track your device if it gets lost or stolen... It would be nice to recover your $700dlls phone right.

Data blocking/allowing per-application *IF ROAMING*

Hi,
I've been looking thru the net, however couldn't find anything useful for what i'm trying to do:
Consider this scenario: You're in and out of your homeland (ie. roaming often), and there are certain things that would make life easier, if there was network access despite roaming.
However, allowing data access system wide will create a bit of an issue in this case. Imagine you're abroad for a few days, and you just HAVE to check that one email account that's important. So you turn on the data-while-roaming switch and...VROOOOOOM... 20 applications urgently MUST have their updates right then and there, no questions asked. Also all unimportant email accounts come running to check whatever spam they can gather from the server. You get the picture.
So the idea is: I'd like to set per-application permissions for allowing data access while roaming. Meaning, i can leave my trusty data-while-roaming switch turned on all time, because any application i have installed must first be allowed to access the network.
I can imagine, this would firstly save the expensive bandwidth, and secondly also save battery power.
The question is: Is there any application out there that lets me do this? I know it sounds like an ordinary firewall, but the distinction between roaming/non-roaming is the essential one.
If i had to write it in pseudo-code, i'd probably go for something like
Code:
OnApplicationNetworkAccess
{
if(datamode == roaming && applicationpermission = onlinewhileroaming)
allowNetworkAccess();
else
blockNetworkAccess();
}
Has anyone ever seen anything like this?
Yes there is, 'droidwall' in the market. SGS has to be rooted though.
It allows to block per app, per 3G & Wifi. Only thing it doesn't do automatically is become active when roaming, you'll have to press one button for that...

[App] WP7 Calendar

posted for my friend, have no internet connection
Hello
WP7 Calendar is now available. This application enable to consult your calendar synchronized with your smartphone.
The application is available through this link:
http://windowsphone.com/s?appid=6bbbd974-077f-4217-98e9-1d177b5570d0
There is a trial version to allow you to discover the application, don’t hesitate to download it
The launching price for one week is set to 0.99 then it will pass to 1,49
Good use
Laranzu
Does this works with already existing calendars or you need to add that to the app ?
The app use the calendar associated to the account you set in your phone.
The app recover automatically the appointment set for each account.
And what are the benefits/advantages/unique features over built-in calendar? Why should I buy this one?
sensboston said:
And what are the benefits/advantages/unique features over built-in calendar? Why should I buy this one?
Click to expand...
Click to collapse
Because it displays week numbers, maybe?
I'll give it a try and report back...
Edit: On the Display page (as shown on last thumbnail) maybe you should leave the start and end times free to choose, not everybody does a normal job, you know, just an opinion. And by tapping the tile, day or week (depending on the tile tapped) should be opened instead of the parameters page which IMHO should be last..
Nice app otherwise, the built-in calendar is frustratingly lacking features.
well, the starting point of the project was to offer a week view. It's something that the built in app doesn't not offer
The browsing between the different view is done with flick instead of having to tap on an icone in the application bar. In the build in app to access month view you have an icon for that.
The month view i provide give some usefull information that let you know if you have appointment in the morning, afternoon or all day. The build in app just display text so small that it's useless.
You can swap easily between view by clicking on week number or on the days. Nice when you want to set an appointment in the futur.
For the tile, you have 2 kind of tiles : week or day. The built in app offer only day and for only the next appointment.
With my tile you can have a graphic view of the day or week and/or the next 2 appointment for the current day.
But the best way to discover the app is to give it a try
Its nice application, but only 5 starts in trial mode is very liitle :-( When i set Live Tiles, some options and trial is done :-( Cannot test, 10 starts could be better number...
One definite bug, and two maybes (first one is a bug);
1) When doing AM/PM, it shows Noon as 12AM middle of day - should be 12PM (this is on day and week views)
2) When viewing day, it does not display starting at the start time you select (not sure where it starts, at current time of day you view it?). Week does.
3) My live tile shows nothing when you first pin it. Takes awhile to show anything (I am guessing the 30 minutes).
LiFePo4 said:
3) My live tile shows nothing when you first pin it. Takes awhile to show anything (I am guessing the 30 minutes).
Click to expand...
Click to collapse
This one is a critical; if author not implemented prompt tile updates (using push notification), this app is useless (regardless of week view).
1) hmm, my mistake. didn't notice that as i mainly use 24h.
2) when you display current day, time is set to the current time. When it's not current day, it's start à midnight. I have to agree that currently the parameter is not clear. Should be better with the next update
3) The first tile update is not generated from the app. you have to wait max 30mn. it's also something i'll adress in the next version.
Beside the first generation, update are running fine.
Thanks for the feedback, it'll help improve the application.
wp7calendar said:
1) hmm, my mistake. didn't notice that as i mainly use 24h.
2) when you display current day, time is set to the current time. When it's not current day, it's start à midnight. I have to agree that currently the parameter is not clear. Should be better with the next update
3) The first tile update is not generated from the app. you have to wait max 30mn. it's also something i'll adress in the next version.
Beside the first generation, update are running fine.
Thanks for the feedback, it'll help improve the application.
Click to expand...
Click to collapse
Thanks. Love the week view. My wife loved it so got it for her's as well.
Following the return of the betas testers and also of the first users, here are the main elements of future V1.1:
View:
- Addition of fixed hour day view (almost finished)
- Addition of a 24hours scrolling week view
Tile: Improvement
- dedicated screen for customization
- Tile preview in the app
- First tile generation made from the app
Number of launch for trail version increased : between 10 and 20 (to be defined)
+ several little things
Delay : Less longer than you wish, faster than you hope 
Benefit from the last days to profit from launching price: change of price Monday
PS: don’t hesitate to evaluate the application
One suggestion, please consider making it open on the day view instead of the parameters page.
It's already done
check in the parameters
wp7calendar said:
It's already done
check in the parameters
Click to expand...
Click to collapse
Sweet! I can choose any page now!
Thanks
This is a nice app. I'll like it more when it can be used to actually edit the calendar. I understand this is a limitation of the OS and not the app though.
A thought:
I don't like when calendars show Sun at the end of the week. It'd be nice to have the option to have it at the beginning of the week.

[Android 2.3+] Data Scheduler

Hello everyone!
Id' like to inform you about recently released app simply called Data Scheduler:
PINYL Studio, mobile developer from Poland, has recently released new app called Data Scheduler. With a little help from this tool Android users finally can manage their data connections in very advanced, yet simple way. The core functionality requires using four parameters - profile start time, profile end time, active connection duration and interval between each reconnect attempt. Those can create uncountable variations to suit every user's need.
Why use Data Scheduler? There are at least two strong answers. Fisrt, you can save your battery life, because permanently active data connections are one of the biggest energy eaters. Second, if your carrier offers you mobile connection paid for transfer, you will eliminate unnecessary connection requests (you don't have to update the weather nor email every minute, especially when you sleep, do you?).
For those who struggle with short battery life and high data connection bills, Data Scheduler from PINYL Studio is the right choice to make.
You can find full version of this app here:
https://play.google.com/store/apps/details?id=com.pinylstudio.datascheduler
For testing purposes you can also use fully functional, but Ads powered free version:
https://play.google.com/store/apps/details?id=com.pinylstudio.dataschedulerfree
In case of any questions or doubts, feel free to contact developer via this website:
http://www.pinylstudio.com/
Click to expand...
Click to collapse
Any feedback would be appreciated!
Cheers!

Create a profile to turn off WiFi or 3g data

I want to create a profile to do the following after the phone screen is locked:
1- hibernate all grenified apps
2- turn off WiFi after network traffic is finished
3- convert 3g to 2g and disable data after network traffic is finished
Or I need an exposed module to to that
1. Use the Greenify app itself on Tasker plugins section (or try with 'stop package.name')
2. Use SecureSettings/AutoTools plugins (or try with 'svc wifi enable/disable' shell code)
3. Try this (will be necessary Xposed and its framework)
I can disable WiFi and 3g data in tasker but I need to do that job on one condition that there is no network traffic.
I want to do that because I want to leave the phone download an app and when it finsihes,tasker turns off wifi
@leprince2007
As far as I know there is not any variable you could use for net traffic.
I have been thinking of doing the same for my profile for some time as it is 4 years old, the only alternative I can suggest is to have a grace period, so when an app is no longer in focus the wifi/data connection will be on for 30 seconds ( can be customised to your personal preference). You can also add another condition if another app loads that requires a Wifi/data connection it will then kill the those actions.
Unless if someone else know there is away to control the wifi/data connection depending on traffic. That's the only thing I can suggest.
For measuring data transfer try this:
https://groups.google.com/forum/#!topic/tasker/k8GrBaZ7LQc
https://www.reddit.com/r/tasker/comments/4n26it/help_getting_tasker_to_monitor_mobile_data_traffic/
CrashOverride93 said:
For measuring data transfer try this:
https://groups.google.com/forum/#!topic/tasker/k8GrBaZ7LQc
https://www.reddit.com/r/tasker/comments/4n26it/help_getting_tasker_to_monitor_mobile_data_traffic/
Click to expand...
Click to collapse
Thank you sir for your help ,but I have a problem here, I don't know anything about coding.
Can you bring me the profile??
@CrashOverride93
Thanks for this I'm going to check to see if this works!
@leprince2007
I am willing to help you, but I will leave this to the person above 1st, to implement this in a task.
Can anyone help me,please??
leprince2007 said:
Can anyone help me,please??
Click to expand...
Click to collapse
OK here is what I did.
For simplicity I copied the Javascriptlet code mentioned in the thread above, and modified it so that you don't get any popups from Tasker.
1. You will need to add a veirible in the task where you want data traffic to be a condition, you will need to name it %Total usage then tap on the two wavy arrows, and type -1
2. You need to create a Javascriptlet you can do this by going to action > code > Javascriptlet
3. Copy the code below that I modified and paste this into the code section in the Javascriptlet. Leave the other settings at default.
var data = [];
var re = /wlan0:\s+(\d+)\s+(\d+\s+){7}(\d+)/;
var sourcestring = readFile('/proc/self/net/dev');
var matches = re.exec(sourcestring);*
data.push(matches[1], matches[3])
wait(1000);
sourcestring = readFile('/proc/self/net/dev');
matches = re.exec(sourcestring);*
data.push(matches[1], matches[3]);
var download = parseInt(data[2]) - parseInt(data[0]);
var upload = parseInt(data[3]) - parseInt(data[1]);
var total = download + upload;
//setGlobal('Download', download);
//setGlobal('Upload', upload);
setGlobal('TotalUsage', total);
4. Now what I did was create a if and else statement after the Javascriptlet, you will need to set your it too %Download then select math grater than and then specifie a number of bytes. I set mine to 500 and all works fine.
Let me know if you need more help
HatchetEgg said:
OK here is what I did.
For simplicity I copied the Javascriptlet code mentioned in the thread above, and modified it so that you don't get any popups from Tasker.
1. You will need to add a veirible in the task where you want data traffic to be a condition, you will need to name it %Total usage then tap on the two wavy arrows, and type -1
2. You need to create a Javascriptlet you can do this by going to action > code > Javascriptlet
3. Copy the code below that I modified and paste this into the code section in the Javascriptlet. Leave the other settings at default.
var data = [];
var re = /wlan0:\s+(\d+)\s+(\d+\s+){7}(\d+)/;
var sourcestring = readFile('/proc/self/net/dev');
var matches = re.exec(sourcestring);*
data.push(matches[1], matches[3])
wait(1000);
sourcestring = readFile('/proc/self/net/dev');
matches = re.exec(sourcestring);*
data.push(matches[1], matches[3]);
var download = parseInt(data[2]) - parseInt(data[0]);
var upload = parseInt(data[3]) - parseInt(data[1]);
var total = download + upload;
//setGlobal('Download', download);
//setGlobal('Upload', upload);
setGlobal('TotalUsage', total);
4. Now what I did was create a if and else statement after the Javascriptlet, you will need to set your it too %Download then select math grater than and then specifie a number of bytes. I set mine to 500 and all works fine.
Let me know if you need more help
Click to expand...
Click to collapse
They are very long steps!!!.Can you upload the profile for me,please???
i`am a beginner in using codes and I may make mistakes.
please help me
leprince2007 said:
They are very long steps!!!.Can you upload the profile for me,please???
i`am a beginner in using codes and I may make mistakes.
please help me
Click to expand...
Click to collapse
Yer coding is not my strength neither I just copy and paste and give thanks.
Here is a link where you can download my profile, you will need to import this within tasker.
https://drive.google.com/open?id=0B8M8tLEXhDNZbU9sM0RIYkYtazg
Thank you very much.I will try it and let you know.
HatchetEgg said:
Yer coding is not my strength neither I just copy and paste and give thanks.
Here is a link where you can download my profile, you will need to import this within tasker.
https://drive.google.com/open?id=0B8M8tLEXhDNZbU9sM0RIYkYtazg
Click to expand...
Click to collapse
Could you please re-upload that profile or email it to me. The link is not working, and I'd love to try it and study it.
[email protected] .com
thejackalsmark said:
Could you please re-upload that profile or email it to me. The link is not working, and I'd love to try it and study it.
[email protected] .com
Click to expand...
Click to collapse
Sure I can do that. Just so you know it does not contain the action to change 4/3G to 2G mode.
It also has other functions like if any other profile requires an internet connection via WIFI or DATA it will keep the connection on, but relies on the other profiles to switch off WIFI/DATA instead.
I have made a few tweaks to make the profile more efficient.
https://drive.google.com/file/d/0B8M8tLEXhDNZc2RMekJvLXg3RzQ/view?usp=sharing
HatchetEgg said:
Sure I can do that. Just so you know it does not contain the action to change 4/3G to 2G mode.
It also has other functions like if any other profile requires an internet connection via WIFI or DATA it will keep the connection on, but relies on the other profiles to switch off WIFI/DATA instead.
I have made a few tweaks to make the profile more efficient.
https://drive.google.com/file/d/0B8M8tLEXhDNZc2RMekJvLXg3RzQ/view?usp=sharing
Click to expand...
Click to collapse
Thanks a lot for re-sharing. The 4/3G<>2G isn't a big deal. I've never been able to get my LG Optimus f7 with Jellybean 4.1.2 using Boost Mobile service to switch to 2G no matter what tricks I've tried.
The biggest thing I'm interested in is having Tasker turn off my 3/4G data after a large/ time consuming download, such as a several hundred megabytes or more file, finishes.
I frequently start large downloads just before bed and turn off data when I get up and check the downloaded file.
Having Tasker monitor such downloads and automatically turn off data (I don't have wifi, just my phone's data plan) when they finish, would be outstanding!
I'll DEFINITELY be studying your profile very carefully and see if I can use it on my phone for this purpose.
Again, thanks for the time you took to reply to my request so quickly on an aging thread, AND sharing your profile.
The Jackal's "MARK"
thejackalsmark said:
Thanks a lot for re-sharing. The 4/3G<>2G isn't a big deal. I've never been able to get my LG Optimus f7 with Jellybean 4.1.2 using Boost Mobile service to switch to 2G no matter what tricks I've tried.
The biggest thing I'm interested in is having Tasker turn off my 3/4G data after a large/ time consuming download, such as a several hundred megabytes or more file, finishes.
I frequently start large downloads just before bed and turn off data when I get up and check the downloaded file.
Having Tasker monitor such downloads and automatically turn off data (I don't have wifi, just my phone's data plan) when they finish, would be outstanding!
I'll DEFINITELY be studying your profile very carefully and see if I can use it on my phone for this purpose.
Again, thanks for the time you took to reply to my request so quickly on an aging thread, AND sharing your profile.
The Jackal's "MARK"
Click to expand...
Click to collapse
You certainly can use it for what you want it to do, with a few tweaks to how the profile works, and changes to the traffic load.

Categories

Resources