yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] reidler:
sounds/vibrate

Hi Zuinige.

I upgraded to 3.8. The new sound and vibrate feature is unbelievable! GREAT! Thanks so much. :). That we can choose the sound file to play and the vibrate pattern is just excellent.

But I have a question. I fear and probably expect that Battclock cannot do this but I want to ask - we never know - maybe there's a trick that I don't know about.

I attached a screenshot of my screen. On the top left in the columns to the right of the date and time, I have 5 items that Battclock monitors for me. I completely rely on these. It looks like this:

M1 V0

T0 E38

R2

M=missed calls. The number 1 means there is one missed call.

V=voice mails. 0 means no voice mails.

T=text messages

E=emails (38 new unread emails)

R=reminders.

When the number is 0, it shows the configured LOW color. If the number is 1 or more it shows it in brighter green

I configured the sound and vibrate and it works beautifully. But only when changing from/into low-medium-high categories. I have it set to low (when 0) and high when 1 or more. When emails are 0 and I get one or more new emails and it switches from low to high the E turns bright green, it shows the number and the sound and vibrate play. But if the number is already 1 or more and then an added email comes in since it has not changed categories it does not play the sound nor vibrate. (It does properly change the number which are registers that Battclock is monitoring.) I understand that it is working exactly the way you set it up to perform but I wonder if there is any type of trick or idea for me to have it play the sound and vibrate whenever the number increases even though it has not changed L-M-H categories? (I think only while increasing. If it played when decreasing then as I read my emails/reminders... it would go off each time the number decreased which would probably not be a good idea.)

Right now I use the HTC Touch Pro 2 (Windows Mobile 6.5) sounds and notifications settings and that works ok. It does make its sound anytime a new email or reminder, etc comes in. But the vibrations are not reliable. It does not allow the user to set the pattern and it has a mind of its own vibrating differently depending on whether the phone is set to vibrate mode, etc. and is very annoying. And the vibrate pattern it uses for incoming phone calls is more annoying. That pattern is also unpredicatable and some times vibrates non stop for minutes. Maybe you can give me an idea if one exists. Really I probably need to use a separate program but I have not found one that is reliable. I tried a few which freeze the phone or have other side-effects. That's why I was so excited about Battclock adding this feature ;)

That you so much for such an excellent and high quality tool.

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
In the logging I see:

2012-01-01 23:09:57 -979229714 m_nCellularCount: 1

2012-01-01 23:09:57 -979229714 RasEnumConnections returns: 0

2012-01-01 23:09:57 -979229714 RasEnumConnections: 0

The last line indicates that no Ras Connections are found, so I cannot get the statistics in my code. This thread also shows the same problem.

So it looks like HomeScreen++ uses another approach. Because I do not have the source code of HomeScreen++, I do not know how that program is doing it. I invested time in an alternative method, using GetIpStatistics, but I could not test that on my phone.

So it is still on the wish list:

- Option to have an alternative way of measuring network statistics (for people were Wifi and/or Mobile data is not working)

But because I have no other example code, I cannot test myself and the rapidly obsolete becoming Windows Mobile platform, I think there is not much chance I can implement it :( I hope you can understand.
[Windows Mobile Apps and Games] ZuinigeRijder:
Good to hear that the new features are useful.

At least you can configure Low = 0, Medium = 1 and High = 2 (or bigger).

That way you have 3 instead of 2 Sounds/Vibrations possibility.

I see you have used already some stripes and battclock info items. You can consider to use the non-used stripes and battclock items to monitor the same registry keys and configure the sounds/vibrations for those for larger values.

Another possibility would be to use Mortscript and do some tricks there, e.g. settings a registry value to 0 and 1 and back to 0 which is monitored by free stripes/battclock info items. I myself do not have experience with Mortscript, but that is the way to go when you want customization beyond out-of-the-box solutions.

Maybe others have ideas?
[Windows Mobile Apps and Games] reidler:
Well, I had spent a lot of time looking for a program to do vibrate patterns but did not find one. On my old Treo 800w I had something called Treo Alert which was great. There were some that came close but had many bugs that caused bad results and crashes on the phone. Someone had suggested that I learn Mortscript and write my own. But I never found documentation on how to learn Mortscript and I don't know how involved it would be. When you said you were adding the sound and vibrate options I was very excited. But then, as I wrote, I realized that you're only doing those sounds and vibrates when changing categories so it does not quite fit this issue even though it works very nicely for what you've programmed it to do.

As you can see, the numbers of emails, reminders... can go quite high, especially emails. Doing a trick here and there the way you described would only add a few more without really attacking the core goal.

I'm stuck with my Windows Mobile phone for the forseeable future right now because my carrier (Sprint) will not let me get an iphone or Android unless I switch my phone plan to a plan more expensive and less features. I don't want to do that. I know many other people that also are keeping their WM phones right now for the same reason. So I am so happy to have Battclock which really makes me like my phone so much more. I'm glad you're still supporting it.

Maybe I should spend more time trying to find out about Mortscript.

Also - I wanted to understand the towers feature you added. How does that work? If I want to set it up so that the Battclock will keep track of the towers I used through a day, how do I do that? I'm sorry I did not immediately find that in the documentation.

Thanks very much.

Eli
[Windows Mobile Apps and Games] jcmm:
Hello Reidler,

That program you have used on your mobile device, and coming out on the image you put in your message?. do not subtract agility to your mobile device?. Thank you if you give me the information.

Best regards
[Windows Mobile Apps and Games] ZuinigeRijder:
Thinking about the use case you describe, it make sense to make it possible to configure BattClock that it plays/vibrates when the high value increases. But of course only when configured as such. So I am thinking about the following option:

- Special option to play a sound/vibrate each time the high value increases (When "High value" divided by 10000 = 911, e.g. 9110001. The High value will get the configured value minus 9110000).

I looks this is easy to implement.

The documentation is on XDA developers, not yet on SourceForge. See this link........

I will also add the CellTower2KML information to the SourceForge site.

For offline converting the Cell Tower Info, you need to enable at least the logging for the following info:

- Mobile Country Code

- Mobile Network Code

- Location Area Code

- Cell ID

The default check time is once per 30 seconds (if one of the items is enabled). You can set the number of seconds via registry key or via BattConfig: "TowerInfoSeconds".

Note that the monitoring does not occur in a deep sleep. At power on after a deep sleep, the monitoring resumes immediately (without the wait of the configured seconds).
[Windows Mobile Apps and Games] reidler:
I don't completely understand your question but I'll answer what I think you are asking. The program I am running on my HTC Touch Pro 2 Windows MObile 6.5 is called IPHONETODAY. I like it. I did not like the HTC Sense program that came on the phone standard because it kept turning on the screen and dialing calls or starting programs. I loaded this and I think it works quite nicely. I think it's efficient and speedy. Also makes it easy to find and run the programs I want quickly. The phone itself is somewhat slow but I dont think IPT makes it slower. I hope I answered your question. Let me know if you need anything else.

Eli

---------- Post added at 03:38 PM ---------- Previous post was at 03:30 PM ----------

Oh. If you could do it I would really love that! Thank you very much. I don't understand what you were writing about the 10000 minus 1 high value. Is that something I would need to set up in Battclock? I have my low value set to 0 and my high value set to 1 right now for each of those items. My high color is green and my low color is dark white. But if there's something I'll need to set up to make the change work I will do that. Thank you so much. You've helped me so much with Battclock! I so much appreciate it.

Thanks for the documentation link. I will look at that.
[Windows Mobile Apps and Games] ZuinigeRijder:
The idea is that you can by this option also set another high value than 1.

- So 9110001 means High Value is 1 and sound/vibrate when it increases over 1

- So 9110002 means High Value is 2 and sound/vibrate when it increases over 2

- So 9110001 means High Value is 10 and sound/vibrate when it increases over 10

- etc.

So it is more flexible than just having a high value of 1. I will see when I can post the update 3.8.1. I was hoping for some other translations, so those could be included too :cool:
[Windows Mobile Apps and Games] reidler:
:):):):):):):):):):):):):):):):):):):):):):):):):):):):)

:p Sounds great. Once again I can't wait. Thank you. ;)

:):):):):):):):):):):):):):):):):):):):):):):):):):):):)
[Windows Mobile Apps and Games] reidler:
Just to add some information as you add the feature. Sometimes several emails or reminders come in together. You would probably not want the vibrate/sound to be consecutive in that case because if 10 emails came in we would not want the sound and vibrate to happen 10 times. Once would be enough. You know what I mean?

As the emails are read and the numbers decrease we would also not want the sound/vibrate to go off either. Unless you felt decreasing should also be an option if you think someone might have such a need.

Thanks again so much!

Eli
[Windows Mobile Apps and Games] reidler:
Uh oh. I'm sorry that I think I found a bug in the Total Uptime Recharge Minutes. It looks like it is not keeping the time minutes properly. At 6:09 AM this morning I unplugged the phone. The battery was 100% and it showed 0R for total uptime recharge minutes. As I watched, within 20 minutes it lost a minute. At 9:09 AM it should show 180R but it is showing 134R. (lost 46 minutes) I suspected it yesterday when after 9 hours it only showed approximately 360R. I first thought it has something to do with the new setting Monitor When Screen Off. I had unchecked that. So I re-checked it and restaretd the phone but still have the problem. I saw the problem happening even though the screen had not yet even gone off.

I'm prettty sure that in v3.6.2 it was accurate.

What do you think?

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
Because BattClock has an background Thread checking the values at most once per second, it will only play once, when it sees a change from e.g. 1 to 10.

Of course if the emails come in one per second, then each email would trigger a sound notification.

Indeed the 9110001 would mean only when increasing. But probably decreasing could also be an option, e.g. 1120001. Or even a combination (102300001). I need to have some special values to see the special case, so I took the alarm number 911 or 112 (Europe) or (911+112) to indicate the special case, because it is easier to remember. But of course I can also take other 'special' numbers. Looks like 911 and 112 is good enough :rolleyes:
[Windows Mobile Apps and Games] ZuinigeRijder:
I will have a look at my code.
[Windows Mobile Apps and Games] ZuinigeRijder:
I could not reproduce the problem. Was you battery 97% or more and did you restart BattCLock in the mean time or change settings? If you can reproduce, please enable debug logging, reproduce the scenario (so at least debug logging for a few hours) and post the debug log file.
[Windows Mobile Apps and Games] reidler:
Hi. I had turned on logging for 4-5 hours this morning. But I messed it up. I went in to turn off the logging so I could upload it to you but when I did that it erased the log! I guess what I should have done was to turn off Battclock and then the file would have beed freed up. Sorry, I started it again. The file had grown to over 10 megabytes. Wouldn't that file size be too big for you?

The battery had recharged to over 97% and the minute count went to 0. I had started the test in the morning after the phone recharged over night and the phone was reset to start fresh.

Anyway, it's interesting. After I turned on the logging it kept time much better and at first I thought it was perfect. But eventually after 4 hours it lost 7 minutes. Before I turned on the logging I was losing a lot of time. I think I had lost more than 60 minutes over a 6-7 hour time period. I will keep my eye on it and watch it while logging is on and while it's off.

How does Battclock keep that time (of the Recharge minutes)? Does it check the cpu cycles or does it actually check the clock time?

Thank you.

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
Indeed the file is deleted, when you disable debug logging. So first exit BattClock, copy logfile and then disable and start BattClock.

When you zip it, it will be probably much smaller. You can also PM me the log file or mail me....

When BattClock gets CPU cycles, it just increments in the background thread per cycle (which runs once per second). When the 60 seconds has been counted, it increments the total and starts from 0. Assumption is that all the work can be done within 1 second. There can be a catch, though. The sound/vibration is also done in the same thread, so I do not know if this is happening very often? Because then I can imagine you miss some seconds, dependent how long the sound/vibration is done.

When there was a deep sleep, BattClock was not able to count the seconds. So it computes the missed minutes when coming out of the deep sleep. Also this is not very accurate. If your phone gets in a deep sleep and out of a deep sleep very often it can also miss a minute (because of truncation) per deep sleep and out of deep sleep. Note that will also cost battery, if you regularly switch between deep sleep/out of deep sleep.

It could be that both situations contribute to the difference for you, but the debug logfile will tell me more.
[Windows Mobile Apps and Games] reidler:
Oh! Now that you wrote that you've given me some more ideas. When I was doing testing with the Sounds/Vibrate I had assigned a 25 second sound clip to the sound. (I did that just for fun and for testing. When I will set it up for real I would use a 2-3 second clip.) Yesterday my wife complained so I turned those long clips off. So that's probably why today it has not lost as much time as I lost yesterday. So I just turned those tests back on and I watched Battclock. If you remember my screen picture I have the clock on the top left showing seconds. Then I did something that caused Battclock to play that 25 second sound clip. As it played I noticed that the clock seconds stopped as long as it was playing and soon as it finished playing Battclock updated the display showing the register and the clock continued again. But it continued only jumping ahead 2 seconds! If it was on 2:25:20 and then the sound started, when it was finished the clock showed 2:25:22 and continued running from there. When the clock got to the top of the next minute it jumped back to the correct time again and skippped about 25 seconds. As I did this several times I see the Total Recharge minutes started losing more and more time. As I did these few tests I lost 3 minutes on the Recharge Total. Probably I am losing the amount of time that the sound takes to play. At 25 seconds I probably lose a minute every two times that sound plays. I hope I have given you useful information.

When you say "deep sleep" I think you mean when the screen blacks out until I push the button to wake it up again. Is that right? It does go into this type of sleep if I do not touch the phone for 2 minutes.

I am still running the log. Hopefully the logs will show you this as well. It's been loggin for over 3 hours now. I started the long sound clip testing towards the end of the 3 hours.

Thank you.

Eli
[Windows Mobile Apps and Games] reidler:
Ok. I attached the battclock.log - zipped. This shows almost 4 hours. But towards the end is where I started doing the long song clip testing I mentioned in my last post. Thank you. Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
The debug log file does show that the playing time is the problem. To overcome this problem the only way to do it correctly is to do this in another background Thread. I will make that change.

Deep Sleep means that the CPU does not get CPU cycles anymore. The Phone only handles the RADIO ad when there is an incoming call (or you press a hardware button), it awakes the phone and the programs can continue getting CPU cycles and just continue where they were.
[Windows Mobile Apps and Games] reidler:
Well, last night I removed the long 25 second sound clips and only kept on the vibrations. I used your default vibration pattern. I also added in a few of my own. (This is just for testing - once you make the change that we spoke about for increasing numbers to trigger a sound and vibrate then I will be setting it up more permanently). Even without that long sound clip it is still losing a lot of time. I unplugged my phone this morning at 6:50 AM and the recharge minute counter went to 0. Now it's 1:20 PM - 6.5 hours later. The minute counter shows 281 minutes when it should show 390.

About deep sleep. When my phone is in its sleeping mode and the screen is black, it still does run programs like email. It downlaoads my emails and beeps when new emails comes in or a text message or calendar reminder. I guess that's how those programs are set up. Battclock probably also continues to work depending on whether we check that new setting.

When you say a background thread, does that show up as another process in the task manager's list of processes? I'm just wondering how it works. As I look now at the processes I see Battclock.exe.

Ok Thanks very much.

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
Let's see if with the background thread the difference disappears.

The deep sleep is also for the other programs, but the programs inform the phone to awake regularly, dependent on how often you want the email to be checked. And for calender items, the programs informs the time to awake.
[Windows Mobile Apps and Games] reidler:
When you say a background thread, does that show up as another process in the task manager's list of processes? I'm just wondering how it works. As I look now at the processes I see Battclock.exe.

Ok. I'll test it soon as you post the update. Thanks. Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
No, it will still be seen as one process. The total number of processes is limited. The number of Threads within a process is not limited (of course there is always a limit).
[Windows Mobile Apps and Games] reidler:
Let me add another observation. This morning at 6:30 AM I unplugged the wire from the phone. The battery showed 100% and the Total Recharge minutes showed 0R. Then the phone screen went black after 2 minutes. At 7:03 I pushed the button and the screen turned on. Now the Recharge minutes showed 2R even though 33 minutes passed. I also had the MONITOR WHILE SCREEN OFF checked. Sorry I did not have the log turned on. Does this fit the thread problem? I think you had said that after the device comes out of deep sleep you checked the clock so maybe this is a separate problem. But I had the monitor while screen off checked so it should have been keeping track even while off so Battclock should not have had to check the clock. :confused: I don't know but I thought you might like to have this extra information.

Thank you.

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
Whenever the phone comes out of a deep sleep and the battery is 97% or more, the TotalUptimeRechargeMinutes is reset to 0. You can adjust this 97% to be 100% (setting). So probably that explains what you did see.

Anyway, I also improve the accuracy of missed minutes at startup in the next update. But it will still reset to 0 in the above situation.
[Windows Mobile Apps and Games] reidler:
Oh! Thanks for that answer. That's an excellent answer. That is exactly what happened. I never noticed if it happened before because I was never watching it so closely. I was trying to recreate it again this morning and could not. I thought once it was unplugged it would not go back to 0. When I turned it on, it showed 2 minutes.

I do not see where I can adjust that setting in Battconfig. So I looked and see you have a place in the registry where that is set. (I searched the registry for a value of 97). HKCU\Software\ZuinigeRijder\Status\TotalUptimeRecgargeMinutesThreshold.

Excellent. Thanks so much. I'll await the update for this fix but more importantly I'm hoping for that other feature that will allow the user more control over the sound/vibrate to turn on when the registry value increases.

Take care,

Eli
[Windows Mobile Apps and Games] ZuinigeRijder:
[APP] [Updated 12 January 2012] BattClock version 3.8.1 *NEW* Sound/Vibration

- Also search for .wma sound files

- Play Sound/Vibrate in a separate background thread to avoid side effects with counters

- Improved accuracy of counters when having been in deep sleep

- Added special option to play a sound and/or vibrate each time the High/Medium/Low value increases (Add 9110000 to the configured value)

- Added special option to play a sound and/or vibrate each time the High/Medium/Low value decreases (Add 1120000 to the configured value)

- Added special option to play a sound and/or vibrate each time the High/Medium/Low value increases/decreases (Add 10230000 to the configured value)

- Added Help link in About screen

- First time BattConfig is started go first to the About screen

- Updated German translations, thanks to Tokl
[Windows Mobile Apps and Games] reidler:
Thank you so much for the update. :) Now I am trying to figure out how to use it. I installed 3.8.1 and it is running. How do I use this 9110000 number? I went to COLORS/SOUND/VIBRATE and went to the field that I am using to show reminders. My LOW number is 0. My HIGH number is 1. You want me to change that high number 1 to be 9110000 instead of 1? There's no room to show more than 3 digits but I'm sure that makes no difference. I entered 9110000 and my immediate tests seems to do it. I will do some more testing with decreasing numbers. Maybe I'll also try testing 9110001 9110002 and 9110003. This is exciting. Thanks again. I'll let you know how it goes. I'll also keep an eye on the Recharge counter. :)

Eli