×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Unable to UNLOCK the phone in s60 3rd edition programmatically

    Hi to ALL,
    I am trying to make an application in S60 3rd edition where I want that my keypad gets locked. For this I have used the code

    Code:
    RAknKeyLock MyKeyLock;
    MyKeyLock.Connect();
    if(!MyKeyLock.IsKeyLockEnabled())
    	{
    	MyKeyLock.EnableAutoLockEmulation();
    	}
    MyKeyLock.Close();
    This is working perfectly fine and the phone gets locked. But the problem is that when I try to unlock the phone with the
    code

    Code:
    RAknKeyLock MyKeyLock;
    MyKeyLock.Connect();
    if (MyKeyLock.IsKeyLockEnabled())
    {
    MyKeyLock.DisableWithoutNote();
    }
    MyKeyLock.Close();
    the phone doesn't get unlocked and it is not working. so can anyone please tell me where am i going wrong?? and how can i unlock my phone programmatically??

    Thanking in advance
    Joy
    Last edited by joy.mca; 2010-08-27 at 11:34.

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

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    it should work, anyway maybe you can check whether the other options would work: http://wiki.forum.nokia.com/index.ph...ng_keypad_lock

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,675

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Does the related code snippet run? Have you traced it with the debugger?
    You can try if it works in the emulator.

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    thanks symbianyucca for that quick reply.
    I have tried using the option
    Code:
    if (MyKeyLock.IsKeyLockEnabled())
        {
        MyKeyLock.DisableKeyLock();
        }
    but it is still not working

    in the link that you provided
    http://wiki.forum.nokia.com/index.ph...ng_keypad_lock
    in the USE CASE 6 it is written that Unlocking requires a CODE. So how and where can I provide that code pro-grammatically??
    Can you please tell me why is that piece of code not working??
    Thanks
    Joy

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

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    ok, did you also try what Wizard suggestded ?

    Also AFAIK you can not read the devices security lock code, so user has to provide it manually.

  6. #6
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Thanks wizard for that suggestion. Actually I tried working that piece of code in the emulator also. And the locking part is working fine whenever I click any option in the menu. But directly I couldnt implement the Unlock code in the emulator because whenever the keypad is locked all the key are disabled on the keypad so that I could nt click any key(except the LEFT SOFTKEY, which on clicking unlocks the phone). Now what i am actually trying to do is that UNLOCK the phone by an SMS message UNLOCK. and ths why am testing that on the device. but it is not working.

  7. #7
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    ya symbianyucca I tried wizard_hu 's suggestion.

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

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    So basically check the logic you are using, maybe use timer first etc. that you can be sure the code is actually run in the device. You could also use on traget debugging, or file logging to see what actually gets executed.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,675

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Use a timer then. Try unlocking 20 seconds after locking for example.

  10. #10
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Ya exactly i tried that using a timer of 20 seconds as you suggested but interestingly enough it is working in the emulator and it is getting UNLOCKED after 20 seconds. But when i run the same application in the device, it is not getting UNLOCKED ater that time. So whats the problem then? Am I missing some capabilities or where am I going wrong??

    Thanks
    Joy

  11. #11
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,675

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Indeed, that was the idea. Now check for missing capabilities in the logfile of the emulator: http://wiki.forum.nokia.com/index.php/Epocwind.out

  12. #12
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Ya wizard_hu I tried that but there was no missing capabilites in that Epocwind.out.. :-(

  13. #13
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Can anyone please suggest me how can I Lock and Unlock the phone as stated in my Post #1. Or any suggestion on how to Lock the phone for few minutes so that a user wont be able to use the phone for that time period.

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

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Would it be in a way that when you have the device locked, user will see the lock screen, in which they need to give the lock code to unlock the device. And as I think that there is no way to unlock the device without ngetting the lock code (as well as I can not remember any public APIs for doing so). would it be possible to just let the user to unlock the device, and then continue with your logic.

  15. #15
    Registered User
    Join Date
    Jul 2009
    Posts
    259

    Re: Unable to UNLOCK the phone in s60 3rd edition programmatically

    Quote Originally Posted by symbianyucca View Post
    Would it be in a way that when you have the device locked, user will see the lock screen, in which they need to give the lock code to unlock the device. And as I think that there is no way to unlock the device without ngetting the lock code (as well as I can not remember any public APIs for doing so). would it be possible to just let the user to unlock the device, and then continue with your logic.
    No....thats the problm with .. :-( ..I dont want that the user should be able to unlock the phone during that lock period... i want to programmatically UNLOCK the phone......so how can i be able to do this ?? any suggestion regarding that.....!!!!....

Similar Threads

  1. Replies: 29
    Last Post: 2008-08-20, 09:52
  2. Replies: 6
    Last Post: 2008-08-20, 08:45
  3. Unable to compile HelloWorldBasic with S60 3rd edition
    By symbianguycpp in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2008-04-30, 08:29
  4. Programmatically get information about current wallpaper in S60 3rd Edition?
    By bharath_hegde in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2007-12-15, 11:18
  5. Replies: 1
    Last Post: 2007-12-15, 11:16

Posting Permissions

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