[Q] Need help tracking data usage over specific date range accurately. - Zooper Widget General

I want to create two side by side bars to show my exact position in my monthly billing cycle and my data used to give me an accurate idea of how well I am doing data-usage wise. I have tried a bunch of stuff but I cant get it and was hoping somebody here could help me out. This is what I have tried so far.
My billing cycle restarts on the 7th.
My first attempt was to get the number of days since last months 7th and today and subtract the number of days since this months 6th using "#D...Td#" to get the number of days in the last billing cycle but the strings ended up really long and I couldnt figure out how to subtract one from the other.
My next try was using the number of days in this month if it is after the 6th and use the number of days in last month if it is before the 6th. This is what I came up with.
Code:
[B]#$0$# [/B]#D$#DM#=1?[B]2014[/B]:#Dy#$$#DM#>1&&#DM#<11?0$$#DM#=1?12:[B]7[/B]$010000l#
This is the logic I use to get a datetime stamp of last month:
If this month equals 1 then append last year else append this year
if this month is greater than 1 and less than 11 then last month is a single digit so append a 0
if this month is 1 append 12 else append this month minus 1
append 01 for the first day
append 0000 for HHMM
I use the generated string in #D...l# to get the number of days in last month. Doing this I ran into two(maybe three?) major problems. The one is that i dont know how to perform an operation inside the if/else without breaking the containing "#D...l#" call. The second was that while I was testing things out (I had a few different strings to try and get last months days or the cycle day count) I removed all of the stuff I wasnt using it broke the working one. I trimmed as much as I could without breaking the semi-working string. if I remove the (useless) "#$0$# " from the beginning the second half stops working again.
The last problem is that I am not completely sure how to use this once I get it. I was going to set the progress bar to start at 1 and end at the number of days in this cycle but then I would have to do a bunch of checks on the current day of the month to find out which day in the cycle it is.
So... Is there an easier way to do all of this? Either way I would like to see how to make the line I quoted above work.
Thanks!

Wrong thread

You should also keep in mind that the data usage info that Zooper displays resets when you reboot (I believe it also resets if you wipe the app cache).

Wrong thread

Mokum020 said:
For me it doesn't reset when I reboot, only when I wipe app cache.
Oh and I forgot to mention, you can use this as value for the data usage progress bar: #NTMTMM7#
Click to expand...
Click to collapse
It looks like it maintains across restarts for me too (using an S5).
I actually came up with another solution which I *think* is completely accurate for cycle time and I was leaving it go to make sure the numbers always looked right. About half way through the billing cycle my data usage broke 1GB and #NTMTMM7# started reporting in GB rounded down to one decimal place. Is there any way to force it to display in MB or, if not, make it display two decimal places? With two I could just check if usage is < 3 and if so, assume GB and multiply by 1024, else assume MB and multiply by 1. It won't be accurate for the first 3MB but that will pass quickly enough.
Looks like I was using the wrong string here after all. I switched it to #NTMTMM6# (#NTMTMM7# seems to be way off, 6 is closer but still like 12MB off...)
The strings I am using to get the min and max values for my day progress bar are....
Min: -$#Dd#>6?(#Dd#-7)$$#Dd#<7?#D$$#Dd#<7&&#DM#>1?#Dy#$$#Dd#<7&&#DM#=1?(#Dy#-1)1207$$#Dd#<7&&#DM#<9?0$$#Dd#<7&&#DM#>1?(#DM#-1)$$#Dd#<7?070000Td#$
and
Max: $#Dd#<7?(7-#Dd#)$$#Dd#>6?#D$$#Dd#>6&&#DM#<12?#Dy#$$#Dd#>6&&#DM#=12?(#Dy#+1)0108$$#Dd#>6&&#DM#<9?0$$#Dd#>6&&#DM#<12?(1+#DM#)$$#Dd#>6?090000Td#$
Which shows -23 (days since 7th of last month) to 8 (days until 6th of next month) right now. I just set Value to 0.
I tried setting min to 0, Value to my current Min, and max to my current Min + my current max but I don't know how to get them to add together. I don't plan on having numbers once I figure out how to make this accurate so that isnt an issue. I just need to test them for another week or two to make sure the cycle end/starts are correct and test them for December/January to make sure the month/year corrections are right. Of course all of this is for nothing if I can't figure out how to get the data accurately.
Mokum020 said:
I think this is what you're looking for, from exactly a year ago http://forum.xda-developers.com/showthread.php?t=2679504
Click to expand...
Click to collapse
I saw that before I posted but I was hoping to come up with something more accurate. I guess I don't know how Sprint works internally but the data used in my account and if I am charged an over usage fee seems to be based on 7th-6th cycles, not 30 day cycles.
Edit:
I finally tested my script with a few different days and made some changes. It looks like it works pretty well. If anybody else needs it...
Day of Cycle (replace all (0)6s with the last day of your billing cycle, add a - sign to use as the min value for a progress bar)
$#Dd#>6?(#Dd#-6)$$#Dd#<=6?#D$$#Dd#<=6&&#DM#>1?#Dy#$$#Dd#<=6&&#DM#=1?(#Dy#-1)$$#Dd#<=6&&#DM#=1?12$$#Dd#<=6&&#DM#>1&&#DM#<10?0$$#Dd#<=6&&#DM#>1?(#DM#-1)$$#Dd#<=6?060000Td#$
Days left (replace all (0)7s with the first day of your billing cycle)
$#Dd#<7?(7-1-#Dd#)$$#Dd#>=7?#D$$#Dd#>=7&&#DM#<12?#Dy#$$#Dd#>=7&&#DM#=12?(1+#Dy#)$$#Dd#>=7&&#DM#=12?01$$#Dd#>=7&&#DM#<9?0$$#Dd#>=7&&#DM#<12?(1+#DM#)$$#Dd#>=7?070000Td#$

Related

Data transfer counter app?

I was just wondering if anyone had come across an app that will record all the data usage from date x to date y and give me a running total.
Basically I have a 30Mb a month data package which resets back to 30Mb allowance on my billing date every month.
What would be great is if I could have an app where I can set the counter to 0 (or 30mb) on whatever day of the month I want and it would show me my usage and alert me when I get within 5 or 10% of the amount I select.
This would then stop me from going over my data package allowance and incurring large bandwidth costs which I don't find out about until my next bill or unless I ring my provider (Orange).
Is it a good idea and does it already exist?
Starfury said:
I was just wondering if anyone had come across an app that will record all the data usage from date x to date y and give me a running total.
Basically I have a 30Mb a month data package which resets back to 30Mb allowance on my billing date every month.
What would be great is if I could have an app where I can set the counter to 0 (or 30mb) on whatever day of the month I want and it would show me my usage and alert me when I get within 5 or 10% of the amount I select.
This would then stop me from going over my data package allowance and incurring large bandwidth costs which I don't find out about until my next bill or unless I ring my provider (Orange).
Is it a good idea and does it already exist?
Click to expand...
Click to collapse
Yes, exist...
http://www.efficasoft.com/gprsmonitor.html
or
http://www.spbsoftwarehouse.com/products/gprsmonitor/?es
Personally use the first one...
Regards.
Thanks a lot...
The first one is loaded and running.
Starfury said:
Thanks a lot...
The first one is loaded and running.
Click to expand...
Click to collapse
Glad to help you
Is there any that are freeware? The "first" one died after 30 days and I am too cheap to register it
Starfury said:
Is there any that are freeware? The "first" one died after 30 days and I am too cheap to register it
Click to expand...
Click to collapse
BatteryStatus have data transfer counter, give it a try...

Word of Warning

So recently i went to Japan for a 3 week holiday. It was good blah blah blah
I decided to take my desire as it would be useful to use when wifi was availabe
However, on many occasions, mostly when drunk....I decided ''**** it, i'll turn off airplane mode and check my e-mails'' I did it more than a few times, but not enough to worry about my bill
So today, i got my phone disconnected by t-mobile. This promted me to immediately call them and ask what's up. They said my account was disconnected by the fraud department as my account seemed different from usua. I told them that i'd been in Japan so maybe it was just because i was now back in uk, the bells started ringing and that nothing was wrong and they should reconnect my line.
I asked how much my bill was
£580!!!!!!!!!!!!!!!!!!!!!!! omg!!! apparently i racked up £400 just through data usage!!!! and the rest in calls
I knew it was £7.50 for 1mb but i didn't realise that checking my e-mails now and then would rack up such an amount
so word of warning....next time you visit somewhere outside your home country....either leave your phone at home, or don't use data or even answer the phone
The worst part was i had to pay them there and now just to get my line reconnected.
second word of warning, always have a spare bit of cash in your bank for a rainy day/extremely expensive phone bills
it makes you wonder what the Desire does when it connects.
ps
I still don't believe anyone that says they got more than 12 hours of battery with normal usage. I seriously need to keep everything to a basic minimum to get a day out of it. but if i use it just normally...then yeah...12 hours is optimistic
ouuuuch!! thats my input to this thread.
You sure you didn't go on porn while you were drunk also?
Uuuuuu!!!! That really sucks!!! Something similar happened to me once when i went to Cuba but it wasn't as terrible as yours, the again, my phone didn't have data back then!!!
ps; i can get 3 days of batt on normal use (includes gmail on push, ocasional word on g-talk, couple of messages a day, couple of calls a day and 10 mins of browsing a day and the ocasional game) and if i happen to push the phone a bit more i still get 2 days easily so there must be something sucking your battery dry!!!!
Just as an example, i havn't used the phone much these days and i'm on my fouth day and i'm pretty sure it'll reach tonights charge no problem.
Barff1984 said:
£580!!!!!!!!!!!!!!!!!!!!!!! omg!!! apparently i racked up £400 just through data usage!!!! and the rest in calls
I knew it was £7.50 for 1mb but i didn't realise that checking my e-mails now and then would rack up such an amount
Click to expand...
Click to collapse
That only works out at 17mb data per week ( £400 / £7.5 / 3 ) which is actually a pretty small amount of data. I'd expect my phone to burn through that in less than a day for my email usage.
If you really want to know how much data your Desire chews through, install a net counter, but of course in your particular case it's rather closing the stable door after the horse has bolted!
Regards,
Dave
I think T-Mobile has ripped you off. When I was also in japan, I was using data including gps but my bill was nowhere near yours. I am on Vodafone.
I would never wanna check my email that much! Ha ha
-------------------------------------
Sent via the XDA Tapatalk App
Barff1984 said:
I still don't believe anyone that says they got more than 12 hours of battery with normal usage. I seriously need to keep everything to a basic minimum to get a day out of it. but if i use it just normally...then yeah...12 hours is optimistic
Click to expand...
Click to collapse
Ouch, that bill hurt.But s**t happens. You should not have to go into airplane mode by the way: There is a checkbox that enables data connections while roaming, just keep it unchecked.
Anyway, about your battery: you should check your partial wake usage. I had trouble with the battery on my desire, until a recent OTA update to 1.20.207.3. Everything seems to be fine ever since then.
You can check your partial wake usage by:
- dialing »*#*#4636#*#*«,
- then going to »Battery history«,
- with dropdowns at »Other usage«
- and »since last unplugged«.
Look at »Running«. This shows useful data, especially if you have been on battery for some time – like 30min – with your phone in stand-by. Some application/service may be blocking the sleep state of the device. Then you will notice »running« at 100% or at least very high – even though the phone was supposed to be in sleep state.
Also search the forums for »potential cause for excessive battery usage«. Since I am a noob here, I cannot post the link, so please use search...
dzire187 said:
Ouch, that bill hurt.But s**t happens. You should not have to go into airplane mode by the way: There is a checkbox that enables data connections while roaming, just keep it unchecked.
Anyway, about your battery: you should check your partial wake usage. I had trouble with the battery on my desire, until a recent OTA update to 1.20.207.3. Everything seems to be fine ever since then.
You can check your partial wake usage by:
- dialing »*#*#4636#*#*«,
- then going to »Battery history«,
- with dropdowns at »Other usage«
- and »since last unplugged«.
Look at »Running«. This shows useful data, especially if you have been on battery for some time – like 30min – with your phone in stand-by. Some application/service may be blocking the sleep state of the device. Then you will notice »running« at 100% or at least very high – even though the phone was supposed to be in sleep state.
Also search the forums for »potential cause for excessive battery usage«. Since I am a noob here, I cannot post the link, so please use search...
Click to expand...
Click to collapse
Yeah, every time you come out of Airplane mode (to make a call or whatever) your phone will try and sync because it knows it's been "out of the loop".
Just keep data roaming off or delete the APNs.
coochan8 said:
I think T-Mobile has ripped you off. When I was also in japan, I was using data including gps but my bill was nowhere near yours. I am on Vodafone.
Click to expand...
Click to collapse
Ahem! Vodafone used to have a "reasonably sensible" (and I use that term loosely) data roaming package - you should see Vodafones new data roaming tariffs that come into effect in June!
Regards,
Dave
P.S. GPS in and of itself doesn't use any data, though certain apps that use GPS may consume data themselves. For example. Google Navigation will use data to pull down maps, whereas Copilot uses maps on SD card and thus consumes no data.
yea it does suck especially since i'm planning on going back to japan for 5 weeks in July. Lol, wont be checking my e-mail half as much.
How do i know if there's an update to my rom? I use the phone to check if there are updates but it always says it's fine. Should i actually check online instead? I know with Winmob it never said there was an update even when there was. I'm kind of hoping android is a bit better for that.
I'll check which rom etc i'm using and see if there's an update.
Ive got a netcounter. However i use task killer a lot because i'm convinced it saves the battery a little. So if i use that, obivously it kills the net counter too.
I'm sure someone is about to say ''you're using android, you don't need a task killer'' however, when i see so many apps running in the background, regardless if people say ''but they're not using memory'', they do. If i kill them all, my phone goes quicker again. So yea it does work.
Barff1984 said:
Ive got a netcounter. However i use task killer a lot because i'm convinced it saves the battery a little. So if i use that, obivously it kills the net counter too.
Click to expand...
Click to collapse
Most task killers have an option to exclude certain apps, so if you must insist on using one ( ), set it to ignore your net counter.
Regards,
Dave
Barff1984 said:
How do i know if there's an update to my rom? I use the phone to check if there are updates but it always says it's fine. Should i actually check online instead?
Click to expand...
Click to collapse
That just means your operator is not offering an update. You may wish to check out the battery history, it may give you some information about what is draining your battery.
Barff1984 said:
I'm sure someone is about to say ''you're using android, you don't need a task killer'' however, when i see so many apps running in the background, regardless if people say ''but they're not using memory'', they do. If i kill them all, my phone goes quicker again. So yea it does work.
Click to expand...
Click to collapse
Well, Android is designed to use all the RAM available, which is a good thing - speaking of software design. There is no reason to keep RAM free on a well designed operating system, because once RAM is required, an unused app is ditched in favour of the new one. As this takes virtually no time there is no need to use time and resources to clean up. In fact, task killers use system resources, resulting in battery usage.
Anyway, what you are seeing is bad design in applications, and that is real: Some apps are active, even though they should not be. Either because you do not want them to, or because they do not properly communicate that they will be running in the background, doing stuff all the time. Android adresses the issue by exposing details about battery usage to the user, thus forcing bad developers to choose the defaults for their apps more carefully.
Again, check out *#*#4636#*#* to identify software that is running all the time. Maybe it's something you do not need that is causing your phone to lag and drain the battery...
Can't you tell t-mobile to disable internet usage on your account when your in another country?
JAmes.
No offense but this isn't anything new data roaming bill have been in the news allot. You really should of known better.... also you should of picked up a pay as you go sum or rolling contract sum for the duration of your trip...
I also hear many counts airports have special visitor sum packages.... you real should of looked into this
-------------------------------------
Sent via the XDA Tapatalk App
Sim damn auto correction.... oh and country
-------------------------------------
Sent via the XDA Tapatalk App
3 ftw ... pay them 15£ and all ur inclusive allowances work abroad
i know what you mean but...
I went on honeymoon to Italy for 10 days with my wife and my desire.
I am with Vodafone and was charged 5 pounds a day for data. They allow 25mbps for a fiver which I think is reasonable. However my.bill breakdown of data usage was shot to sh*t ...some days showed 24mb others 100+, all I was doing was this website, the BBC, and a beekeeper one. I complained, they checked the bill and gave me 35 quid back. Also another 30 off next months bill too.
Overall my 10 days cost me 50 quid.
Sam
This is why when abroad always always get a local sim card if you need calls to come in divert your number its soooo much cheaper.
lumpaywk said:
This is why when abroad always always get a local sim card if you need calls to come in divert your number its soooo much cheaper.
Click to expand...
Click to collapse
sage words.
sounds like the OP has the desires full suite of syncing going on.
With my old HD I got lost in europe and fired up google maps, it was set to satellite mode and it cost me 5 quid just to find out where I was and that was about 30 seconds usage.
There is a 'data off' app out there. It just kills all data connections until further notice.

Mod delete please

MOD DELETE THIS PLEASE
Somehow Tapatalk posted the original thread three hours later without any indication it still knew I had made it.
Contact their support, you might still be in a penalty range for that much data usage
Tomcat5 said:
From what I remember from last month, at least in the last two weeks, I've had average data speeds of 30 to 100Kbps down. This is in an area where I could previously get 100Kbps down without a problem, often reaching to 1700Kbps. For the last week I have accepted this speed which is impossible to really download anything or even open images. I thought that since I had about 14GB if data usage last month that I had just been getting throttled. My new billing cycle started today and my speeds are still complete crap. What gives? Any ideas? I already re flashed my ROM and radio version to no benefit.
Sent from my Phone with An App
Click to expand...
Click to collapse
I doubt it. Try Googling for pathetic Sprint download speeds and you will see you're not alone. Sprint is sucktaculer at this point in history.

[Q] Number of days since xth day of last month?

Hi,
I would like to return the number of days since the 12th of the current month up until the 11th of the following month, e.g.
I had the following conditional statement:
$(#Dd#-11<0)?(#Dd#-11+#DI#)#Dd#-11)$
It works up until (#Dd#-11) is greater than zero but then it fails when it's the following month.
It doesnt seem possible to add #Dd# and #DI#?
Any help appreciated,
Garret
Does this example get what you are after? It shows approximate # days since 25th (assumes 31 days per month, I think):
$#Dd#<26?#Dd#+6:#Dd#-25$

changing first day of the week

any ideas how to make the first day of the week on the watch to be Monday instead of Sunday? It applies to all my metrics and they end on Saturdays but I haven't been able to find a way to change it anywhere
kostas90 said:
any ideas how to make the first day of the week on the watch to be Monday instead of Sunday? It applies to all my metrics and they end on Saturdays but I haven't been able to find a way to change it anywhere
Click to expand...
Click to collapse
I believe it takes it from the Time zone of the Phone where it syncs to.

Categories

Resources