×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Question event autolock the keypad ???

    Hi! I will works in carbide c++ and my app is for s60v5 (touch celphone)

    I want know when the cellphone does autolock the keypad.
    I was try capturing all handler events , but auto keypad lock don't make events !!!!
    my app is in background or foreground , I try to make an un lock application =)
    is there any better method?

    please help!

    Thank you in advance

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,006

    Re: event autolock the keypad ???

    I do not think there exists any direct way to monitor the same, but a workaround is still there which you can try :

    http://www.developer.nokia.com/Commu.../unlock_status

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: event autolock the keypad ???

    Hello,
    this is just an idea, never tried, but in avkondomainpskeys.h you can find definition of KAknKeyguardStatus:
    Code:
    const TUid KPSUidAvkonDomain = { 0x10207218 }; // Same as KPSUidAvkonInternal
    
    /**
     * Indicates the status of Keyguard
     *
     * Possible values are:
     *
     * 0: Keyguard is not active
     * 1: Keys are locked
     * 2: Autolock emulation enabled
     *
     */
    const TUint32 KAknKeyguardStatus = 0x00000001;
    
    enum TAknKeyguardStatus
        {
        EKeyguardNotActive,
        EKeyguardLocked,
        EKeyguardAutolockEmulation
        };
    since it's a P&S key, you could try to Register for notification of changes to a property:
    http://www.developer.nokia.com/Commu..._and_Subscribe
    http://www.developer.nokia.com/Commu...or_subscribing

    let us know if it works...

    regards
    pg

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Re: event autolock the keypad ???

    thanks for the response!!

    pavarang :
    i don't know where is that library avkondomainpskeys.h . my carbide c++ 2.7 with S60_5th_SDK_ASP_v1.0.1 can't find that library. which lib I must import??

    I thinking in your idea , I think with subscribe to the "keys locked note" that says (use unlock button for unlock screen device) could me save a lot of work.
    some one know how I can do it?

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Re: event autolock the keypad ???

    thanks pavarang!!

    I was tried this code and it can be work well. the values for ".GetFocusWindowGroup();" for S60v5 are different, nothing major. but I think that code can be useful for my proyect =) .

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: event autolock the keypad ???

    Basically, you don't need to have the avkondomainpskeys.h, since the information you would need is presented in the post, so you would simply need to listen to that property.

    For GetFocusWindowGroup(), I actually do not see any point on checking it, it should be enough to simply monitor focus changes, and once focus change happens, you check whether the keypad is locked. And if it is, then you just got keyloack event. If it is not, then something else just got the focus.

  7. #7
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: event autolock the keypad ???

    Quote Originally Posted by symbianyucca View Post
    Basically, you don't need to have the avkondomainpskeys.h, since the information you would need is presented in the post, so you would simply need to listen to that property.
    symbianyucca already replied, but just to be sure that you grabbed the idea:

    just copy the snippet i took from avkondomainpskeys.h into your code (post #3 above)
    then, use code from wiki article: http://www.developer.nokia.com/Commu...or_subscribing
    and use KPSUidAvkonDomain as uid, and KAknKeyguardStatus as key when you call RProperty::Attach()
    when the value of the key changes, RunL() is called, and there you can check its value with RProperty::Get()
    if you get an error like -46, maybe ReadDeviceData capability is required
    I'm sorry you have to check and experiment for yourself what happens on your devices...

    otherwise use the first suggestion from vineet, explained by symbianyucca too

    regards
    pg

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: event autolock the keypad ???

    in Addition to the PS-key usage. You MUST understand that when using an API which is not included in the public SDK, you would indeed be using an API which has no compatibility promise whatsoever. This efectively means that, if you want to be sure it works ok, you would need to test it with all devices you are thinking of supporting, as well as there could be breaks in usage even within firmware versions.

    Anyway, that said, these things often do work just fine, anyway, you should be ready for suprises as well.

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Re: event autolock the keypad ???

    thanks to all!!
    finally I use the propouse of vineet.jain and handler of keypad event, and works well for my proyect

Similar Threads

  1. problem in querty keypad event handling
    By jayesh4456 in forum Symbian
    Replies: 1
    Last Post: 2012-01-06, 15:30
  2. autolock
    By Bill_Murray in forum Symbian
    Replies: 1
    Last Post: 2008-03-02, 16:52
  3. How to capture keypad slider event?
    By yaohongwang in forum Symbian
    Replies: 0
    Last Post: 2008-02-21, 04:54
  4. Replies: 1
    Last Post: 2002-09-04, 03:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×