yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
I am seriously impressed with the concept of this software and the enormous amount of work that ZuinigeRijder has put into it. However, despite playing with all the settings and reading almost all the posts in this forum I am still having some difficulty with which I would appreciate some help.

I have a Touch HD running Topaz/Rhodium ROM (Dutty 3.7). The behaviour I want is:

No lock on normal wake-up from power button.

Lock on incoming call only

Lock hardware keys only to allow slide to answer

Unlock via stylus

To test this I have:

AutoLockonPowerOn = 0

LockWhenIncoming = 1

LockWhenIncomingKeysOnly = 1

UnlockOnLightSensor = 0

The problem is that the phone wakes up and unlocks automatically when a call comes in: as if the LockWhenIncoming setting is ignored. If I have AutoLockonPowerOn set then everything works perfectly, but I would prefer not to have to unlock if I press the power button.

Log file attached over a ring event in the hope that helps anyone.
[Touch Diamond, MDA Compact IV Themes and Apps] be-ro:
Display on after ending call

Hello,

I like you program very much. Just one question:

Is it possible to turn on the display again after ending a call (i.e. when the light sensor detects light again)? This would avoid the necessity to push the power button after a call to enable the display again. I know that there is the possibility to leave the display on during a call but I think turning off the display is a desired feature to safe battery.

In other words:

1. phone to the ear -> turn display off

2. phone FROM the ear -> turn display ON

Regards,

Bernd
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
There is a brilliant app that does this already. See this thread:

http://xdaforums.com/showthread.php?t=488991

I agree it would be brilliant if both these apps were combined into one but in the meantime...
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
The request is high on the wish list. I am first experimenting to have a Security window, that must be unlocked first before you see the information beneath. So yes, this is a simple foreground window approach, as an option. This can then also be used for people where the Keyboard hook is not working for or for Diamond 2 users which wants also the softpanel to be locked or they want the TouchPanel fully locked.

The other request was already on the wish list:

add option to automatically go to the home screen when locked (Security)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, this problem has been reported before and I tried to solve it, but apperently this has not been solved. The problem is, that the power on request and incoming call interfere and that therefore the incoming call is handled incorrectly. People who have the lock on power on set, do not experience this problem. Can you explain why you only want to lock at incoming call? Because you can also press accidently the pwoer button in your pocket?

Anyway, I have a test version, which should fix your problem. Can you test?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Hmmm, I detect the call ended, so I can enable the screen easily. But I thought this will be done automatically, when a call is ended?

And the display off/on is already a feature which is already a standard feature of the Diamond, provided by HTC, which you can enable/disable. So I though I do not need to add that to TouchLockPro, because it is standard behaviour you can enable. What phone do you have and is the feature of HTC not working on your phone?
[Touch Diamond, MDA Compact IV Themes and Apps] aguida:
That is very interesting. Where can you do that on your touch? I don't seem to have found such an option, and the only thing mine does is to turn off the screen when I move the phone to the hear, but it doesn't turn it on anymore unless I press one of the hardware buttons.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
You are right, the light sensor stuff of HTC is only used for turning the screen off and will not turn the screen on.

The tweak is described here, how to disable/enable.

8. Prevent screen switching off during phone call --> HKEY_Local_Machine\Drivers\BuiltIn\RIL\EnableFastDormantDisplayDuringCall to 0 (Note: does not work on all ROMs)

AND (tested and works on EU ROMs thanks to Rod65)

HKCU\ControlPanel\Phone\Sleep switch value from 1 to 0

Of course, you must disable ScreenOffWhenConnected in TouchLockPro in the TAPI Setting screen.

But this tweak will indeed not turn the screen on, when there is Light sensed. Actually, I have to play with the light sensor, because the Touch InCall Tweak describes:

So it doesn't use the light sensor then?

From v1.0.6 it DOES use the light sense to detect if it is against your ear. This is really a double check to back up the orientation. It doesn't use it to determine if it's away from your ear because the sensor doesn't seem to work when the screen is off, so it's of no use for switching the screen back on.

But TouchLockPro has the possibility to keep the phone alive, with !BACKLIGHTOFF. I need to check, if I can still sense light via the light sensor then :confused:
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Simply put, it's much neater, easier to understand and reacts quicker. The fact that you can specify the time before light/stylus etc. change is recognised as a trigger is a big plus. You appear to have wisely understood that people will want to use their 'phones in different ways and have simply provided them with access to all the options. Pocketshield became a little too top heavy with its phone skin, messages etc. although the latest "lite" version was a good improvement.

TouchLockPro is easier to use and more intuitive and the fact that it shows the screen whislt locked instead of an overlay lock screen is much more sensible.

That said, Pocketshield does handle the bluetooth and wired headset issues we are discussing and (as a Touch HD user) I really liked the swipe to unlock feature. In my case, I want to rely on light mostly but like an alternative for dark situations. Swipe to unlock is more natural to me than stylus removal. Any chance of adding this as another sensor method?
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
I will check tonight and/or tomorrow and post as soon as I can.

Unfortunately, this will ahve to wait until Tuesday as I don't have my headset handy.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
I'm not sure how the Diamond works but the Touch HD has a quite definite press power button and I have never found that this is operated accidentally. Since power-on doesn't happen accidentally but only when in my hand and subject to a deliberate action, it seems superfluous to have another action to further unlock.

I will try the new version and report back tonight or tomorrow.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I also have found another registry key:

System\State\Hardware\Handsfree

This one is zero, at my phone.

Also there is the registry key:

System\State\Hardware\Headset

Maybe you can also check the values for this registry key too. Maybe this gives me the value to detect if handsfree/headset is active.

Looks these are easy to detect :)
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
OK, I tested the Touch HD with bluetooth headset.

HKEY_LOCAL_MACHINE \System\State\Hardware\Bluetooth

changed from 8 to 9 with bluetooth on and from 9 to 13 (0D Hex) when the headset was connected.

Neither of the other two keys changed.

The key:

HKEY_LOCAL_MACHINE \System\State\Hardware\Headset

changed from 0 to 1 when headphones were plugged in. Unfortunately I don't have a wired headset (with mic and answer keys) with me at the moment but I'd lay odds that the key HANDSFREE will change. I'll be able to test on Tuesday.

On the other topic, I'm afraid 2.6.4 didn't work either.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, thanks for the testing effort.

Can you also post a debug log file with 2.6.4, so I can see, why it does not lock. Maybe I see then why it is wrong and I can fix this problem.

I can also make a test version with the bluetooth detection of 13, in a next attempt....
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Log file attached for 2.6.4. Now here's an interesting thing; the first time I tried to do it with this log - it actually worked. The next two times it failed.

The first time it worked was immediately after a soft reset.

I have tested and this is a repeatable pattern - immediately after a soft reset, it works exactly as intended. After that, no go.

But all three should be captured on the log so hopefully this will help.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, I spotted the problem. The powerOnTickCount was not yet set, so again interference between power on and incoming call.

Here is a new attempt to fix the problem. I also added that bluetooth is active, when the registrykey HKLM\\System\\State\\Hardware\\Bluetooth > 9.

Can you test again :cool:

Thanks.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Still no joy with the lockonincoming call only, I'm afraid.

I attach the log file again.

I will test the bluetooth separately so that it doesn't confuse the log.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Bluetooth success!

New Bluetooth setting works perfectly - well done and thanks.

When a bluetooth headset connection is active, the screen stays locked, even with an incoming call and impervious to light. An incoming call wakes the screen but keeps it and the HW keys locked irrespective of light levels. A stylus remove will unlock the screen (I don't have other unock methods so don't know about those).

With the bluetooth headset disconnected but still with bluetooth enabled and on, the system will unlock with light as normal.

Perfect.

I do hope that you can sort out the incoming call problem. I remain able and willing to test all you like. Would it help to check any registry entries whilst a call is incoming?

BTW, any thoughts on whether you might want to try a slide to unlock sensor?
[Touch Diamond, MDA Compact IV Themes and Apps] ederhj:
Event Bluetooh connection

Hello,

my Problem is, that I only want to lock my Phone, when an Bluetooth-connection is established.

An vice-versa.

Why?

I have a installed bluetooth-headset in my car. My phone ist always in my pocket. But the Phone wakes up when a call is incoming. And so i can accidently use the touch screen or the keys.

Is there any way to set it up or to put in a new version?

Than U

HJE
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Great. You earn most of the credits, because you came up with the easy way to detect the bluetooth connected (so not only bluetooth radio on) AND the testing effort. :)

Now indeed, see if I can solve the lock at incoming call problem. For now, you can just use the lock at power on, for the time being. I will look into the log file.

There is no slide to unlock sensor, normally these are just mouse gestures, so if the TouchPanel is locked, you cannot detect them :( The Capacitive NavSensor can do that, or a Zoombar, but that is not working on a Touch HD.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
This is available in a test version and it works now. You can try the test version here, till I post the official version.
[Touch Diamond, MDA Compact IV Themes and Apps] Alkerion:
Hi !

I've got the exact same problem and solved it with the light unlock option, it now works like a charm.

BR
[Touch Diamond, MDA Compact IV Themes and Apps] o.k.:
Hi ZuinigeRijder,

first of all it is a great application, thanx a lot for sharing.

Sorry if it is a well known question, unfortunately I did not find an answer.

Is there a particular reason why while the whole screen is locked, the right upper corner area (where typically close/ok button resides) is not locked?

It is not an absolute showstopper, but I have accidentally closed an active application in this way, so thought it is worth it to ask :)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
This is the behaviour of the general Windows locking method of the TouchPanel. If you have a Touch Diamond, Pro or HD, you can consider using HTCLockAPI = 1, because that does lock the whole TouchPanel, including hardware keys. But then you miss some features, like only locking the hardware keys and unlocking via hardware keys.

I am also experimenting with a Security foreground window, so that should also lock the whole TouchPanel......
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, I have a next attempt. It looks like enabling the touchpanel has the side effect that the lock on incoming call is executed while inside the power on request in the ClockWndProc.

Now I check at power on request, after enabling input, if I still need to enable the input and lock/unlock appropriately.

Hope this solves the problem, when you only want to lock on incoming call.
[Touch Diamond, MDA Compact IV Themes and Apps] The Missing Link:
Unlock on reminder

Using this tool for a while, always working fine. Last few versions seem to unlock the device when an Aganda alert pops-up. If that happens while my HD is in my pocket... :(

I must be missing some configuration option that is off now and was on in earlier versions. Anyone?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
It is possible the hardware keys and/or TouchPanel cannot be locked, if a program uses the same Hook procedure. Since version 2.6 this has been changed. If you want the same locking behaviour as before, you can enable HTCLockAPI = 1. But then you cannot use some new features like unlocking via a hardware key or only lock the hardware keys.

You can also enable debug logging, reproduce the scenario, note the exact time and post the \TouchLockPro.log.txt, so maybe there is a configuration problem.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Sorry I haven't been around for a day or two. I will download this and check tomorrow. Only if it fails will I try and work through the log to understand what's going on! I feel there must be something to be learned by the fact that it works the first time after a soft-reset but not thereafter.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
So if this si the problem,

Is this the solution?

If the lock indicator was a full page transparent foreground window (as well as the one-pixel red stripe or a battclock white square) then the touch panel need not be locked. Instead, TLP could simply monitor that foreground window for a predefined swipe (my prefernce would be top to bottom) which would simply close that window hence "unlocking" the touch panel.

Although there will be extra processing as TLP monitors the touch panel, this would only be happening whilst the touch panel was "on" and "locked" i.e. 30 seconds at most after an accidental switch on.

Just an idea and feel free to say rubbish and ignore it. :rolleyes: For me, fixing the lockonincomingcall only would give me practically the same thing with the Touch HD slide-to-answer phone skin. :D
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, while testing, I found that the lock KeysOnly did not work in combination with the lock on incoming call only (for the ones who want to use this in combination with a slide 2 answer). This I have solved now too. I am pretty sure I did now solve the problem on lock on incoming call. Hope this can be confirmed.

See attachment for the version, which also solves the KeysOnly.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
The Security (foreground) window can indeed detect swipes. The problem is, it can be transparent, but the underlying screen will not update in Windows Mobile, a restriction which does not exist in full Windows. That is why other locking solution add information about caller andother usefull information, as a substitute to the builtin information.

So if you configure a foreground, the information in the back will not be updated. So that is why I always resisted in providing that option. But for a Security foreground window may be acceptable, for the ones who want to keep prying eyes from the phone (and you do not need to provide other usefull info). On the other hand, a lot of people do not want this Security window, or only when there is NOT an incoming call. So these will be the options to select by the user, if my try out succeeds.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Ah, I wondered why no-one took that approach - although I thought the screen in Winterface updated whilst the lock was one. Maybe worth a look. I'll see if I can check too.

Is the update restriction just whilst the foregorund window is active? In which case how long does it take to update? Could you:

Switch on screen with touch panel locked

Update screen

Place transparent window

Remove touch panel lock

Monitor transparent window for swipe?

And do it all in less than 500ms?

If so, you're probably there. Otherwise, put a security screen up. Don't get sucked into the "information screen" jungle
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
I was about to post about the KeysOnly setting but you beat me to it. Will donwload and test tonight - but certainly the lock on incoming seems to work now. Well done and thanks.

I am ready to try the headset button test. Do you know what reg key I shouold monitor to see what codes are passed? I checked my headset and since it has only a single button for talk, end and last number redial I can only think that it send a different signal to the phone. But if I know what I'm looking for, I can check for sure.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
In principle that could work. Or even do this regularly, till unlocked. However, some people want to have the whole TouchPanel locked, including the soft buttons, which will not be locked in a Diamond 2 with the current TouchPanel lock :mad:. So for them this is not a solution.....
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Good to hear that the lock on incoming calls is working now. Hope the KeysOnly also works :rolleyes:

Interesting is to know which keys are seen by TouchLockPro, if the headset buttons are pressed. It is not a registry key, but the keyboard hook which will detect the keys. If you enable debugging, TouchLockPro.log.txt will show the blocked keys in the logging:

LLKeyboardHookCallbackFunction hooked vkCode

I expect the following vkCodes:

114 = Talk: VK_TTALK = 0x72

115 = End: VK_TEND = 0x73

If that is the case, I cannot distinguish probably between Headset keys and Hardware keys. Fingers crossed ;)
[Touch Diamond, MDA Compact IV Themes and Apps] galerio:
I have many problem with my Diamond:

when I change settings, sometimes it accept the changes, other times it does what it wants:

I have selected to LockTouchPanelOnly and then I have unselected that option, but now even if the stylus is in, the lightsensor is covered etc etc the touch panel is not locked (but the BattClock says that the pda is blocked!!!!).

I continuously have strange behaviour that I can't correct. When I have a phonecall, I need that hardkeys aren't blocked during the call, but nothing to do, even if I have checked "Unlockwhenconnected" and in Incoming !UNLOCK, Connected !KEEPALIVEON.

I don't know what to do now. I have already tried to reset to default but nothing. Every time I change a setting I sfot-reset my phone.

So, please, is there a way to really reset this software?
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
Excellent. It all works perfectly now. A really first class contribution to the HTC range - thanks for all your efforts.

I hate to mention this because it is a tiny issue and not worth worrying over, but there does remain one small quirk (I won't call it a bug). If the screen goes off whilst the phone is locked (eg a call isn't answered), then it remains in the locked state when the phone next comes on - irrespective of the AutoLockonPowerOn setting.

I'm afraid I have an issue testing with the headset. It appears I can't get it to work at all (i.e. even answer an unlocked phone). I think this is more to do with the ROM I have flashed rather than your app but I'm afarid I'll have to play around a bit before I can report back some test results. Sorry.
[Touch Diamond, MDA Compact IV Themes and Apps] hgrimberg:
Program not working anymore after soft reset

The latest version was working ok until I soft reset my HTC Diamond and the program stopped working. It was impossible to make it lock the phone again. Do I have to re-install the program after every soft reset to make it work?

I think I saw somebody having the same issue some time ago in this forum.

Thank you.
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
OK, I knew there was a reason I should stick to testing not development.:o Unless you'd be willing to do this as a Touch HD option like the NavSensor and Keyboard sensors are for specific machines?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Probably the cause is as described in QuickStart and Features:

Make sure that the PIN has been entered after Boot or Reset, before TouchLockPro will lock the phone, otherwise the TouchPanel may not be locked
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Because the BattClock indicates it is locked, I suspect the cause is as described in QuickStart and Features:

Make sure that the PIN has been entered after Boot or Reset, before TouchLockPro will lock the phone, otherwise the TouchPanel may not be locked

Is there also a special reason you only want to lock the TouchPanel? If not, you can also use the HTCLockAPI = 1, which is more reliable with the problem as described above, bt then you miss some nice features like unlocking via hardware keys or locking only the hardware keys.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Good to hear it is working for you too :)

I will have a look at the little quirk, if that can be solved too.

Take you time for testing the headset, you did already a good job testing :D The only way to get all those little things perfect for all situations is only possible with people helping in testing in a range of different phones and ROM's. I always believe in small steps, improving and adding features over time, with in mind the design principles, keep the porgram small, efficient and keeping the battery consumption low (actually, TouchLockPro saves battery).
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I will first see if I can get the Security foreground working and then I can try the transparant thingy. I will do it step by step, so maybe your suggestion will come over time.....

As for now, the wish list is still full of ideas ;)

I do this in my spare time, and some wishes are waiting already long, so I pick the ones which I think have the most added value. Eventually features with less priority will come in :rolleyes:
[Touch Diamond, MDA Compact IV Themes and Apps] golightlygl:
I know, I know - I'm getting greedy! That's what happens when you deliver something so good to we ingrates. Take your time, do it right and to your principles. Ignore us unless we can help you along your path.

Thanks again.
[Touch Diamond, MDA Compact IV Themes and Apps] galerio:
Well, I don't have a pin to enter in my phone, never had it!

And now I have problem also with BattClock that is not appearing with settings entered and with colour selected...

Then, when it locks, during a call it locks hard keys so I cannot end a call (I have to manually unlock). This is very annoying. And it happens even if I have the Unlock command on Incoming and Connected field.

Then, like other users, I have the headset issue: I cannot answer or end a call with the headset button if the lock function is active.