yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] mike2nl:
Hi thx1200,

>>so it's actually BBGGRR, not RRGGBB...

Ohh, i am so stupid. Yes right and that did it for me.

>>Anyway, the config tool works, so try that!

I use all the time the registry editor on my phone. It is faster for me and then restart the service (BattLineSvc(BLSO:))

>>The default color for the lines are black. Try something bright, like FFFFFF (white) and see if you see them

Mhh... no difference but this can be an issue with the DUSK theme. I don't need it, it was only a test for me.

Now i have my green/yellow (60%/40%) line visible on charging. This is really a very helpfull app. With that i have my battery under control.

Why i need this:

I working with the manila today page (MTP 0.4.1.0) and the iPhoneToday (iPT 1.4.6) add-in. NOT to have an Iphone feeling, brrrrrrr. No it is for me faster to start the apps here then in the original Programs tab from HTC.

I startup a new thread with all possible today page add-ins. Do tests of battery drain, functions, install and de-install tests. The test will run with the original today page from HTC and the MTP app. For the battery drain test i need it visbile (power on startup and power after 12 or 24 hours). And your app is the best one i have tested (3 different one) at the moment. I will also post the link for your app in the new thread.
[Windows Mobile Development and Hacking General] Bebeth:
:eek: F A N T A S T I C ! ! !

I already have a BatteryBar Prog. And I wont say that I wasn't satified about it cause it does only one thing, show the power left in battery...

But when I saw the post saying that is a SERVICE "program", I knew that was a better one than the other I've ever seen...

I was in programming longtime ago and I know the power of simple, one-thing-doing-app... And yours is a reel good one...

I'm not sure if is just cause I think that is a better, lower resource prog, but my phone seem to be quicker.

If not, then I love it to much I think... ;)

Thanks-a-lot

EDITED: ps:there is a way (or may-be a next feature...) to get the bar on the left or right side of the screen. It's probably me but when it comes to power-level showing thins, it seem (to me) to be more efficient to see it going up/down...
[Windows Mobile Development and Hacking General] mike2nl:
First page of xda

Hi thx1200,

you are on the first page.

http://www.xda-developers.com/

Take a look here after i clicked to the thread page. Yes you have a little killer app...

http://www.xda-developers.com/windows-mobile/battlinesvc-v2-battery-status-indicator/
[Windows Mobile Development and Hacking General] gkaravid:
Awesome APP!!!!

Thanks a lot!

Consider adding a memory line too, like some other app I've seen around here.
[Windows Mobile Development and Hacking General] thx1200:
Wow... Cool. I've never been on the top of xda before. I feel special. :-D
[Windows Mobile Development and Hacking General] mike2nl:
Yes you can...:D
[Windows Mobile Development and Hacking General] zanix:
Hi, I love this

Its much easier to read than the default, small battery icon

I have one question, would it be possible to be able to set the background colors transparent?
[Windows Mobile Development and Hacking General] w64bit:
Hello,

Very good app.

Is there any chance to add reminder sound for battery low?

If yes, please add "choose file sound" and time between sounds.

Thank you.

Quinn
[Windows Mobile Development and Hacking General] tsalta:
This litle app is SUPERB

Befor i use many diferent apps that do the same but this one is really FASTER, Easy to Adjust and work great and acurate:)

THANK YOU VERY MUCH
[Windows Mobile Development and Hacking General] thx1200:
No, that is not possible. It's not a part of the available GDI API that the titlebar uses to display. It's technically possible to take a screenshot of the titlebar, apply a color filter, then draw that in the window, but it would cause flicker and it's more complex than the time I want to put into this app.

In the future, I could probably allow you to set a bitmap drawn in the BattLineSvc area, so you could simulate a semi-transparent type of look. That's a bit off in the future as I have other projects calling my name right now.

I wish there was like a Windows Phone stipend that us hobbiest developers could partake in so we could quit our day jobs. ;-)
[Windows Mobile Development and Hacking General] thx1200:
I was thinking about that. The problem is that battery indicator status is not updated while the device is sleeping. BattLineSvc would have to periodically wake the device to get the latest status, which in itself would waste a little battery power (but not too much).

I also was thinking about creating a battery drain alarm. Sometimes when you are not in good coverage area, your radio will work harder to get a signal. Heck, sometimes it happens in good coverage area when there's just bad weather. Then you'll open your device and it'll be on like 30% power and you're like what the hell? I've hardly used this thing! ;-) What my idea would be is that BattLineSvc checks the battery level on like 15 to 30 minute intervals, and if the battery is draining faster than, say, 10% per hour (or whatever), it will beep/vibrate and you can take action, like shutting off the radio temporarily, plugging it in, or whatever, long before it reaches any critically low battery level.
[Windows Mobile Development and Hacking General] tsalta:
This project sound cool to me,we must focuse of the battery
[Windows Mobile Development and Hacking General] porkrinds13:
very nice app...thanks:)
[Windows Mobile Development and Hacking General] jotte:
Thank you very much! Very good job!

regards
[Windows Mobile Development and Hacking General] Bib_x:
Hi, please can someone upload version 2.1?

I can´t download from codeplex.
[Windows Mobile Development and Hacking General] ers2258:
Here's the CAB

Here you go buddy.

By the way, it works great on my HTC Touch Pro 2 (Sprint)

I just need to figure out how to Save my Wobble Girls now. :D

View attachment 295028
[Windows Mobile Development and Hacking General] Bib_x:
Thank you. Is there a chance to make the color of the bar like on this picture below?
[Windows Mobile Development and Hacking General] ers2258:
Good Idea!

Good Idea! I would like this too.
[Windows Mobile Development and Hacking General] mike2nl:
I think for this type of color there are enough application outhere and here on xda. For me is the ONE color perefct.

Of the development can create a registry setting to change that. No settings tool neede in that case
[Windows Mobile Development and Hacking General] zanix:
Aww, its ok. I just ended up setting the background as black.

A bitmap, png, jpg, whatever would be great, and also as the foreground part as well. This could allow someone to use a gradient look for the bar.

I really do like this, thanks for all of the great work!

That would be awesome.
[Windows Mobile Development and Hacking General] Bib_x:
What´s the difference between batti and this app?

Any big difference?
[Windows Mobile Development and Hacking General] mike2nl:
You will find the answer in the 1st post of this thread...
[Windows Mobile Development and Hacking General] Som30ne:
Suggestion: gradient color change

I think it would be nice to see the line color gradiently changed from the Full color to the empty color, hitting the color set to low at the point of the selected "low" percentage, and from there gradiently changing to the critical color at the point of the selected percentage of "Critical".

(if it is not possible to set color change gradiently, then a simple color of critical to the left, then color of low, then color of normal would also be OK)

A reference can be the app here:

http://xdaforums.com/showthread.php?t=281891
[Windows Mobile Development and Hacking General] Scalpos:
Curiosity

@mike2nl could you please tell me what software do you use to display Batt %, Temp & Batt drain, as shown on the picture of one of your previous posts: ?

Thanks
[Windows Mobile Development and Hacking General] Scalpos:
self-answer

TouchlockPro, I suppose ? ;)
[Windows Mobile Development and Hacking General] pupakota:
VistaHide Battery Gauge

Shame that BattLineSvc cannot have such look...i'd switch.
[Windows Mobile Development and Hacking General] thx1200:
A future version (when I get some time) will allow you to create a bitmap for the battery level and background, so that will allow you to give it that look.
[Windows Mobile Development and Hacking General] Som30ne:
Power consumption of the BattLine Service

On saturday, I installed 2 new apps on my device:

1: Co0kieMonster's HomeTab

2: BattLine Service.

Since then - the power consumption increased dramatically.

Before that - my device's battery dropped about 13-15 percent on an average day.

So made a little test to see which of the Apps is responsible -

(All tests were done with the device "suspended")

the results are not too encouraging:

Date Time	Batt Level	BattLine	Co0kie HT
2010/03/28 19:00	94%	-	+
2010/03/28 20:00	93%	-	+
2010/03/28 21:00	92%	-	+
2010/03/28 22:00	91%	-	+
2010/03/28 23:00	88%	+	+
2010/03/29 00:00	86%	+	+
2010/03/29 01:00	84%	+	+

See that with the BattLine uninstalled - the device used about 1% an hour,

and with the BattLine installed, the device used at least 2% each hour.

Sadly I didnt have the time to perform the full comprehensive test -

with none of the apps installed, and with BattLine only.

(Hopefuly I would be able to do that during the next few days)

(The device used is HTC HD2, ROM 1.48.405.2(71294) Manila 2.5.19211619.0)
[Windows Mobile Development and Hacking General] pupakota:
Thanks.

You cannot definitely say your interpretation of test gave you real image of situation, imho, you did not have fully(i mean really fully) charged device there - battery drop is just not LINEAR(less energy=quicker battdrop, so at 12% drop may be really quick, i.e.), lots of variables there(especially on HD2 and other devices full of useless soft). Also, sometimes even 100% =/=100%, so drop may be faster with every minute regardless of working software.

but this is interesting, it may tell us, that service i not good idea for such type of program, if your test is going to be confirmed...hm.

I need to check this and compare battery lifetime with vista batt gauge ..

upd: i've read other topic about similar type of software, and it seem like HD2 is just not energy efficient device(2-7% of idleloss daily is not good result, imho), btw.
[Windows Mobile Development and Hacking General] kubiix:
I can't install the 2.1 cab on HTC Panda WM5.0 :(

The message about unsuccesful instalation apears. I am installing it into device.

is there any problem with Panda or am I doing something wrong
[Windows Mobile Development and Hacking General] mike2nl:
Hi Scalpos,

easy answer is here (BattClock 1.9, dutch software :D withAppToDate support);

For a taskbar like mine you have to use a background picture with 1x~48pixel (~ = depence on the upper task bar hight).

BTW: this is not battery %, it is the needed CPU performance
[Windows Mobile Development and Hacking General] mike2nl:
Hi pupakota and Som30ne,

i have installed the same as Som30ne and i have no battery drain at all.

Question: which other software is installed? There can be a problem with other dependencies. No? Why you know that?

What is known: cookies mod needs more cpu power because the functions (tested now on 15 different phones with all my friends). But the app from cookie is one of the best peace of soft i have seen for that issue.

How to solve: switch off animation and swipe the app buttons under the bottom bar.

More to solve: Active sync is more active if cookies mod is active. But there is a solution for that (read this) That was the solution for my friends and me. We all have also running iPT and now our CPU's needs not so much performance then before and the battery drain is AWAY. When you will have more standby time: Don't install ANY software.

Why all this: with which operating system you are working, windows? You have more questions like this?

Answer: problems with MS and Active Sync are known from every developer and everyone has different problems with that. So please ask Microsoft for a solution, i think :D or use an iiiiiPhone :D.

I am not rude, i will only be clear. I think everyone has forgotten what we all here are using MS trouble bubble shi..y things.
[Windows Mobile Development and Hacking General] thx1200:
I highly doubt it's BLS. All BLS does is sit around waiting for battery events. It does not actively poll the system anymore. Even when it did, it only did so when the device was NOT suspended. BLS does request unattended mode so it can retrieve all power notifications reliably, but that only lasts 15 seconds after suspend and BLS does not reset the idle counter.

Others have already discussed the problem with your test and percentages, so I won't bother. :-) Good luck finding your power drain.
[Windows Mobile Development and Hacking General] thx1200:
It may not support WM5.0. I compiled it for 6.0+. :-(

I may be able to compile it for 5.0. I'm not sure if I'm doing anything 5.0 can't support in the service. I need to research.
[Windows Mobile Development and Hacking General] thx1200:
I disagree with there being a problem with AS. I think a lot of the problem stem from constantly trying to prevent AS from doing its thing. lol. I sync to exchange, so I have an active push email AS session running all day. Still, after an entire day, my TP2 will only be down to about 75% at the end of the day. Seriously!

A lot of these problems are ROM related with so-called performance and battery life enhancements that have the opposite effect. Sometimes killing a process to save CPU/battery has the opposite effect.

;-)
[Windows Mobile Development and Hacking General] mike2nl:
Hi thx1200,

you are also right. But when i delete the start process for autosettime and active sync in the registry (my own tests) the battery drain is over. Also Active Sync has one job :D:

10 poke "i have to sync"

20 goto 10

This results in a drain. I think this is logical and legal ;).

Right, and that is what i have tested. Now around for 4 weeks after i have found and read so many things. And at the end i have one phone (glass broken phone from a friend, housing lost and open :D) to test all the apps togehter, until i find a problem. And i find enough problems. After i have found a solution or the code is changed, i install it on my 1st phone.

You are right, and what's the problem? Charge it and that's it. When we will have an eye on all things here on earth so as on our phones, it will be 100 times better. So start with something different to save power and not with our phone's. Please don't touch my phone it is my soul :p.

[JOKE]Everyone buys new toilett paper when it is out. If someone laments... haaa the paper is empty, how can i spare it in the future?[/JOKE]
[Windows Mobile Development and Hacking General] Som30ne:
Well,

I have removed Co0kie's HT and the Battline -

abd the drain was at about 1 percent per hour.

I have re-installed just the BattLineSVC,

and the drain jumped to 2-3 percent per hour.

I will post the Full report when I install Co0kie's HT, and measure the Batt drain (probably tomorrow).
[Windows Mobile Development and Hacking General] thx1200:
I have CHT and BLS (of course) and do not experience power drain. Maybe it's the 1% battery increments causing the issue? That's not stock ROM behavior. Otherwise, i would lean toward your ROM. What ROM are you using? Neither BLS nor CHT should cause this.
[Windows Mobile Development and Hacking General] thx1200:
LOL. I think we may have different definitions of power drain. surely, with ActiveSync deleted, you will gain battery life because you lose a lot of the timer events involved with syncing and scheduling. If you are okay with that or don't use all the sync/organize features, then that's a great solution!

I consider power drain as a rather aggressive battery life drain. I don't think 25 to 50% for a day's worth of use bad and I think the synching and so on is worth a little more battery drain than without. :-) Basically, the overheard of establishing a push email, I don't consider 'drain' but just the cost of doing business. lol.

Also, ActiveSync is actually quite a bit smarter than you tease. ;-) When in push-email mode, it leaves a TCP connection open with Exchange, but then goes to sleep. After the so-called 'heartbeat' (which I think is 20-30 minutes) it wakes up and sets up a new TCP connection. When updates are available, Exchange pushes data down the pipe to the open connection, which wakes the device and it will then act on it. Pretty clever.

If you have push disabled, though, it is what you wrote above, but with one extra line...

10 poke "i have to sync"

20 Wait some amount of minutes

30 goto 10

;-) ;-)
[Windows Mobile Development and Hacking General] pyth27:
I've been using BattLineSvc for one or two weeks now and I experienced heavy battery drain during this time. I did a lot of testing but i never supected BattLineSvc because it's described as very battery friendly.

So I was very surprised when I read that someone complained about battery drain in this thread. I uninstalled BattLineSvc and reinstalled the tool I was using before (WMMiniBattery). Here is what I observed:

When using BattLineSvc my battery would have lasted from morning to late evening, so I would have to charge it every night.

After uninstalling BattLineSvc the battery drain has decreased and it is still at 89% after 12 hours since the last full charge.

When using BattLineSvc I noticed that my phone was losing quite much power when it was in sleep mode, especially over night. One time my phone went from 50% to 0% while I was sleeping so I had to charge it after waking up. Now it loses only 5-10% over night.

This is only what I experienced, it is not a proof that BattLineSvc increased the battery drain. Maybe BattLineSvc activates something else that leads to a higher battery drain, I don't know. I like BattLineSvc very much because of obvious reasons (runs as a service, highly customizable) and I hope this problem can be solved. :)
[Windows Mobile Development and Hacking General] Som30ne:
Well, I have performed the comprehensive test,

and the conclusion is conclusive -

BattLine is surely draining power (at least on my device).

See for yourselves.

(as specified on the original message, I use a NON custom ROM:

1.48.405.2(71294) Manila 2.5.19211619.0 on an european HD2)

Date Time	│Batt Level	│BattLine	│Co0kie HT
2010/03/29 04:00	│100%	│--	│ --
2010/03/29 05:00	│??	│--	│ --
2010/03/29 06:00	│??	│--	│ --
2010/03/29 07:00	│??	│--	│ --
2010/03/29 08:00	│98%	│--	│ --
2010/03/29 09:00	│98%	│--	│ --
2010/03/29 10:00	│97%	│--	│ --
2010/03/29 11:00	│96%	│--	│ --
2010/03/29 12:00	│95%	│--	│ --
2010/03/29 13:00	│93%	│++	│ --
2010/03/29 14:00	│90%	│++	│ --
2010/03/29 15:00	│87%	│++	│ --
2010/03/29 16:00	│86%	│++	│ --
2010/03/29 17:00	│83%	│++	│ --
2010/03/29 18:00	│80%	│++	│ --
2010/03/29 19:00	│77%	│++	│ --
2010/03/29 20:00	│75%	│++	│ --
2010/03/29 21:00	│???	│++	│ --
2010/03/29 22:00	│71%	│++	│ --
2010/03/29 23:00	│???	│++	│ --
2010/03/30 00:30	│66%	│++	│ --
2010/03/30 07:00	│100%	│++	│ --
2010/03/30 08:00	│???	│++	│ --
2010/03/30 09:00	│???	│++	│ --
2010/03/30 10:00	│94%	│++	│ --
2010/03/30 11:00	│92%	│++	│ --
2010/03/30 12:00	│100%	│---	│ ++
2010/03/30 13:00	│100%	│---	│ ++
2010/03/30 14:00	│99%	│---	│ ++
2010/03/30 15:00	│98%	│---	│ ++
2010/03/30 16:00	│98%	│---	│ ++
2010/03/30 17:00	│97%	│---	│ ++
2010/03/30 18:00	│96%	│---	│ ++
2010/03/30 19:00	│95%	│---	│ ++
2010/03/30 20:00	│95%	│---	│ ++
2010/03/30 21:00	│94%	│---	│ ++
2010/03/30 22:00	│93%	│---	│ ++
[Windows Mobile Development and Hacking General] pupakota:
I wonder if BattLineSvc is forcing showing REAL battloss..
[Windows Mobile Development and Hacking General] Som30ne:
Well,

Since on my typical use I get about 4-5 days of use from the device WITHOUT any charging, and with BattLine I seem to lose about 40 percent of the battery, I would guess that even without the BattLineSvc I see the REAL loss of battery charge.

To be honest - I havent tried letting the device die off with the BattLineSVC installed, so maybe the BattLineSVC messe up the battery loss display, and the device would have been able to live for 4-5 days without a charge, although I highly doubt it.
[Windows Mobile Development and Hacking General] thx1200:
I don't understand your chart. Can you elaborate?
[Windows Mobile Development and Hacking General] thx1200:
Well, honestly, you will see at least one post on EVERY application of somebody who claims battery loss. lol.

That said, I do take these reports seriously, but I just don't see any way BLS is causing this.

Can all of you with battery issues confirm that the Forced Update Interval is set to 0?
[Windows Mobile Development and Hacking General] thx1200:
4-5 days of life??? What device are you using? i haven't seen that kind of battery life from any smart phone before.
[Windows Mobile Development and Hacking General] pupakota:
lol. how's that? wizard with good rom was able to work up to 7 days. asus(with 4y.o. battery) - 5-6 days.

nothing uncommon for good rom(less bs soft=better), and normal usage(and good device, i assume).
[Windows Mobile Development and Hacking General] thx1200:
Code Audit Time!

Here's the guts of BLS...

g_mq = CreateMsgQueue(L"AvianWavesBattLineSvcPwrNotifQueue", &mqopt);
if (g_mq)
{
g_pn = RequestPowerNotifications(g_mq, PBT_TRANSITION | PBT_POWERSTATUSCHANGE | PBT_POWERINFOCHANGE);
if (g_pn)
{
while (WaitForSingleObject(g_mq, INFINITE) == WAIT_OBJECT_0)
{
// Eat the power notification
ReadMsgQueue(g_mq, &buf, sizeof(DWORD) * 16, &numberRead, -1, &flags);

// Refresh the battery on any power change (we repeat several times since sometimes the battery level does not refresh in sync with the status change
RefreshBatteryStatus();
g_nowRepeat = 1;
if (g_battTimerNowProc == 0)
{
g_battTimerNowProc = SetTimer(0, 0, 2000, battTimerNowProc);
}
}
}
g_pn = NULL;
}

g_mq = CreateMsgQueue(L"AvianWavesBattLineSvcPwrNotifQueue", &mqopt);

This creates a message queue on which BLS can listen for system events.

g_pn = RequestPowerNotifications(g_mq, PBT_TRANSITION | PBT_POWERSTATUSCHANGE | PBT_POWERINFOCHANGE);

This asks the OS for notification when a power transition (wake to sleep, sleep to wake), status change (on AC / on batt), or power info (charge level) changes.

while (WaitForSingleObject(g_mq, INFINITE) == WAIT_OBJECT_0)

Sleep indefinitely until the OS gives us a message on the message queue.

ReadMsgQueue(g_mq, &buf, sizeof(DWORD) * 16, &numberRead, -1, &flags);

We don't care what the message is because we perform the same action on any message, so we just do a ReadMsgQueue to eat the message, but don't use the data in the buffer.

RefreshBatteryStatus();

Perform the battery check logic -- fetch the battery level and the AC line status.

g_nowRepeat = 1;
if (g_battTimerNowProc == 0)
{
g_battTimerNowProc = SetTimer(0, 0, 2000, battTimerNowProc);
}

Some devices do not synchronously give us accurate battery data, even when we ask for synchronous updates, so set a timer to execute twice at an interval of two seconds apart to recheck the battery.

Anybody see anything I'm doing wrong with the API? Or any assumptions I am making that are incorrect?

I still wonder about that 1% battery level mod... What if it's jittering (100 to 99 to 100 to 99 to 100 to 99 etc) and it's just sending a gazillion battery notifications...?
[Windows Mobile Development and Hacking General] thx1200:
Jeez you guys must have no internet services enabled and not use the device much. My wizard gave me about two days if I used it lightly! But I have always had push email, rss updates, podcast downloads, and more, so... :-)

EDIT: I'm CDMA and I've heard GSM is better on battery, so I'm sure that's part of it too. :-)