×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    108

    programmatically lock/unlock keypad

    hi,

    is there a way to programmatically lock/unlock keypad? (series 60, c++)

    thanks,
    ash

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    132

    RE: programmatically lock/unlock keypad

    Hi Ash,

    Take a look at the RAknKeyLock class from aknkeylock.h

    Br,
    FN Developer Support

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    18
    Hi,

    I have tried instancing the class RAknKeyLock, but while using any of the functions of this class I get an error message “KERN-EXEC 0”. Can anybody help me out for this.

    Thanks,
    Nilesh

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169
    Hi

    If I remember right KERN-EXEC 0 is most usually caused by bad handle, so check & re-check that you open all RClasses correctly, and if you are using any pictures to show check that the are loaded correctly, since having a valid pointer to a bitmap, but not having loaded a picture to it correctly would give you this same error.

    yucca

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    18
    Hi Yucca,
    Thanks again for your reply. Yes I have traced my application and seen that the when the object is initialized the value is 00000. I m not using any other class before this.

    my code is :-

    RAknKeyLock objKeyLock ;
    objKeyLock.EnableKeyLock () ;

    is there anything else what I have to before???

    Thanks;
    Nilesh

  6. #6
    Registered User
    Join Date
    Sep 2003
    Posts
    18
    Hi Yucca
    I got the solution and my application is running properly.

    Thanks;
    Nilesh

  7. #7
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Bangalore,India.
    Posts
    63

    How did u lock the phone

    Hi Nilesh,
    How did u make the locking functinality work.

    I got liitle information in SDK help. Is there any other aPI to call before calling EnableKeyLock/DisableKeyLock ?

    Please give me the solution to do it.

    Regards,
    Sreenivasulu Y

  8. #8
    Registered User
    Join Date
    Sep 2003
    Posts
    18
    Hi Sreenivasulu

    Ok, you have to include aknkeylock.h you have to connect the RAknKeyLock object i.e.

    RAknKeyLock objKeyLock ;
    objKeyLock.Connect () ;
    objKeyLock.EnableKeyLock () ;
    objKeyLock.Close () ;

    Regards
    Nilesh

  9. #9
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Bangalore,India.
    Posts
    63

    Thanks and new finding

    Hi,
    Thanks for ur code sample.

    One more thing I found out was that we can unlock
    the phone from code as it is automatically done and internal
    to the notifier that displays 'unlock' softkey.

    I tried the sample( in the aPPUI as menu items) :

    objKeyLock.Connect();
    if(!objKeyLock.IsKeyLockEnabled())
    objKeyLock.EnableKeyLock();
    objKeyLock.Close();

    AND

    objKeyLock.Connect();
    if(objKeyLock.IsKeyLockEnabled())
    objKeyLock.DisableKeyLock();
    objKeyLock.Close();

    The second part of code will never be called in succession to the
    first as unlocking is done by the notifier itself.

    Thanks for ur reply.

    Regards,
    Sreenivasulu Y

Posting Permissions

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