See this - Running Console Applications in Carbide.c++
But better to test the application on the device.
See this - Running Console Applications in Carbide.c++
But better to test the application on the device.
sir,
i have written application using "SDK S60 3rd edition FP1" does it work on Nokia 6670
sir,
i have written an application for long keypress in SDK S60 3rd edition FP1
i want to run it in N72 what should i do?
As far as I know, there isn't any change in the APIs for achieving this. So you just need to build it for S60 2nd edition, FP3 SDK(because N72 is a S60 2nd edition, FP3 device).
If you haven't installed that SDK, download it from S60 Platform SDKs ( from drop-down list, select 2nd Edition, FP3 version) and install it.
If you have Carbide.c++ v2.0, then it does not support S60 2nd edition SDKs, officially. You can hack it as explained in this blog: http://blogs.forum.nokia.com/blog/lu...carbide.c-v1.3
Or
Download Carbide.c++ v1.2.2 from this link: http://www.forum.nokia.com/Resources.../Archive.xhtml
After setting up environment, simply create a new project under S60 2nd edition, FP3 SDK and copy-paste your logic in that new project, which you have created for S60 3rd FP1 version.
I hope this helps.
Nokia Developer Wiki Moderation team
sir,
The long keypress not working in my N72 when this code use
Code:TTime iStartTime; TTime iEndTime; TTimeIntervalMicroSeconds iInterval; TTimeIntervalMicroSeconds minIntervalRequiered = TTimeIntervalMicroSeconds(2 * 1000 * 1000); //two seconds // connect to window server RWsSession ws; TKeyCode keyCode = EKeyApplication0; User::LeaveIfError(ws.Connect()); CleanupClosePushL(ws); TRequestStatus status; // create a window group for the thread RWindowGroup wg(ws); wg.Construct((TUint32)&wg, EFalse); CleanupClosePushL(wg); // capture a key up and down events User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyApplication19, 0, 0)); // scan code of camera button is EStdKeyApplication19 // listen for the key presses ws.EventReady(&status); // hide this window group from the app switcher wg.SetOrdinalPosition(-1); wg.EnableReceiptOfFocus(EFalse); CApaWindowGroupName* wn=CApaWindowGroupName::NewLC(ws); wn->SetHidden(ETrue); wn->SetWindowGroupName(wg); // handle key events for(;;) { User::WaitForAnyRequest(); //wait for events if (status.Int()==KErrNone) { //if not error TWsEvent e; ws.GetEvent(e); TInt eventType; eventType = e.Type(); if(eventType == EEventKeyDown){ iStartTime.UniversalTime(); //key down time } else if (eventType == EEventKeyUp){ iEndTime.UniversalTime(); //key up time iInterval = iEndTime.MicroSecondsFrom(iStartTime); //difference = duration of the press if (iInterval> minIntervalRequiered) { console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)); console->Write(_L("Long key press, press 5 to end daemon\n")); keyCode = console->Getch(); delete console; } } // if not ours, then send to top window group // note that this breaks key repeat :-( TInt wgid=ws.GetFocusWindowGroup(); ws.SendEventToWindowGroup(wgid, e); } ws.EventReady(&status); // stop condition if (keyCode == EStdKeyF11){ break; } } // clean up ws.EventReadyCancel(); CleanupStack::PopAndDestroy(3); //ws, wg, wn
You are capturing Camera key in your application. It might not be the same in N72. What you should do is to create one test application which captures all keys and trace the value of camera key. Once you determine the correct key code for camera key, use that in your main application.
Nokia Developer Wiki Moderation team
sir,
what changes should be made ,so as to retrieve the keypress 2
Code:TTime iStartTime; TTime iEndTime; TTimeIntervalMicroSeconds iInterval; TTimeIntervalMicroSeconds minIntervalRequiered = TTimeIntervalMicroSeconds(2 * 1000 * 1000); //two seconds // connect to window server RWsSession ws; TKeyCode keyCode = EKeyApplication0; User::LeaveIfError(ws.Connect()); CleanupClosePushL(ws); TRequestStatus status; // create a window group for the thread RWindowGroup wg(ws); wg.Construct((TUint32)&wg, EFalse); CleanupClosePushL(wg); // capture a key up and down events User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyApplication19, 0, 0)); // scan code of camera button is EStdKeyApplication19 // listen for the key presses ws.EventReady(&status); // hide this window group from the app switcher wg.SetOrdinalPosition(-1); wg.EnableReceiptOfFocus(EFalse); CApaWindowGroupName* wn=CApaWindowGroupName::NewLC(ws); wn->SetHidden(ETrue); wn->SetWindowGroupName(wg); // handle key events for(;;) { User::WaitForAnyRequest(); //wait for events if (status.Int()==KErrNone) { //if not error TWsEvent e; ws.GetEvent(e); TInt eventType; eventType = e.Type(); if(eventType == EEventKeyDown){ iStartTime.UniversalTime(); //key down time } else if (eventType == EEventKeyUp){ iEndTime.UniversalTime(); //key up time iInterval = iEndTime.MicroSecondsFrom(iStartTime); //difference = duration of the press if (iInterval> minIntervalRequiered) { console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)); console->Write(_L("Long key press, press 5 to end daemon\n")); keyCode = console->Getch(); delete console; } } // if not ours, then send to top window group // note that this breaks key repeat :-( TInt wgid=ws.GetFocusWindowGroup(); ws.SendEventToWindowGroup(wgid, e); } ws.EventReady(&status); // stop condition if (keyCode == EStdKeyF11){ break; } } // clean up ws.EventReadyCancel(); CleanupStack::PopAndDestroy(3); //ws, wg, wn
sir,
mwldsym2.exe: Undefined symbol: 'int E32Main(void) (?E32Main@@YAHXZ)
what is ur exact problem ..Can u explain clearly?
Capturing long key press is too easy ...what ur problem ..which keys r u trying to capture..?
search for GlobalLongKeyPress.zip on wiki. It is a perfect example on how to capture long key press..
it will help u out..
sir
my problem is when 3 long press in N72 a sms is to be sent
Re-read my previous post thoroughly. I asked you to perform some steps; step by step. http://discussion.forum.nokia.com/fo...5&postcount=35
Nokia Developer Wiki Moderation team
but this is not a good idea as this scenario is used by the phone for Speed Dialing also if enable, so you should be using some other mechanism !!!
Amit Kankani
Nokia Developer Champion
Yes. We have known issue for this case also: KIS000708 - Applications should not capture events from numeric keys
Nokia Developer Wiki Moderation team