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.
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.
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.
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
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.
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
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
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
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
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 !
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
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.
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).