×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    1

    Cool Lock Nokia keypad from application

    Hi

    I am writing an application for messaging system and wondering if there is a way to lock keypad from the application so that I dont have to go to main screen.

  2. #2
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    116

    Re: Lock Nokia keypad from application

    hi,
    Yah using the RAknKeyLock class u can lock the phone's keypad without coming out of ur app. The following code will help u in doing the same.

    RAknKeyLock keylockobj1;
    keylockobj1.Connect();
    keylockobj1.EnableKeyLock();
    keylockobj1.close();

    Hope this will solve your problem.
    with regards,
    Hemanth.

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Lock Nokia keypad from application

    Hemanth,you have posted C++ code here in Mobile Java section. I guess kokasoft was in need of some Java code and AFAIK this is not possible from a MIDLET.

    Regards
    Gopal

  4. #4
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    116

    Re: Lock Nokia keypad from application

    hi,
    Thanks for the info man. but i never saw any note that mentioned that he is expecting something from the java side. but if it is so, sorry for the correct info at the wrong place.
    with regards,
    Hemanth.

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Lock Nokia keypad from application

    Hi Hemanth,

    Please note that this is the Mobile Java section, so it's implicit that everything posted here should be Java unless the poster states the opposite. I think Gopal is right in this regard.

    BR,

    Juarez Junior

  6. #6
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Lock Nokia keypad from application

    Hi Kokasoft,

    >>if there is a way to lock keypad from the application

    I don't think there is way to lock the keypad from j2me. But as hemanth said it will be possible with C++.


    Wang

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    10

    Smile Re: Lock Nokia keypad from application

    Dear Friends,

    I want know why key pad lock is not possible in j2me if it is possible in c++.Please let me know the reason behind.

    Regards,
    Hari

  8. #8
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Lock Nokia keypad from application

    Hi Hariku.264! Welcome to Nokia Developer Discussion Boards!!

    To make it simple : JavaME does have limited access to system/native services. And there is no such method available in JavaME to lock the keypad. Where as C++ have more access to native services.

    Regards
    Gopal
    Twitter : @balagopalks
    Linkedin : @balagopalks

  9. #9
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Lock Nokia keypad from application

    this concept is also called "sandbox" principle.. limit applications (and thus developers) regarding memory access but also underlying hardware funcitonality and/or services...
    you might try to use the search functionality of this forum and look for sandbox... that would be a great occasion to learn about the seacrh functionality int his forum, that will help you out a lot in the future !

  10. #10
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Lock Nokia keypad from application

    Hi,

    Just to complement, if you need to have special access to any device resource or hardware, in Java ME you must have a Java JSR supporting it. Depending on the devices series (S60, Series 40), if the device allows (has the hardware to support a given feature), it can be further extended using native plugins.

    For example, Forum Nokia has released an extension for newer S60 devices allowing access to Sensors API (JSR 256 - Mobile Sensor API).

    Mobile Sensor API (JSR-256) Add-on for Nokia 5800 XpressMusic

    http://www.forum.nokia.com/info/sw.n...r_s60_5_0.html

    Note that it will never be possible for Series 40 devices as their native environment is a closed one.

    Hope this helps! :-D
    Juarez Alvares Barbosa Junior - Brazil

  11. #11
    Registered User
    Join Date
    Jun 2009
    Posts
    10

    Smile Re: Lock Nokia keypad from application

    Thanks for ur reply,

    Ok then tell me is it possible call c++ exe or c++ functions from j2me.(I know we can do it with JNI).What is my idea is to make phone lock/Unlock I will call c++ function/c++ exe from j2me.Is it possible please tell me.

  12. #12
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: Lock Nokia keypad from application

    J2ME does not support JNI.

    However, you could make a C++ server, and then use local (127.0.0.1, localhost) TCP/IP socket calls between a MIDlet and the native C++ server/application. Search for "midpjni" for an old example showing how to do it (it was originally on http://midpjni.com but that's not the case any longer).

Posting Permissions

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