| Reply | « Previous Thread | Next Thread » |
|
hi there,
i've got some questions 1. can a bluetooth device (nokia digital pen SU-1B) connect to my apps? my apps is located at nokia 3650. 2. if can, can my apps catch the image or bytes transfered from the pen? thanks for your help. really need an answer Rx-
Last edited by Rx-lee : 2004-02-25 at 11:43.
|
|
Images from the pen ends up in the inbox. If you override the function "HandleSessionEventL" you will get a notis when something is changed in the inbox. The code bellow is a example where my application reads the incoming pen image and copy it to a new file. The "GetPenFile" function is locating the pen images filename.
void CPenEmailAppUi::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* /*aArg2*/, TAny* /*aArg3*/) { TFileName fileName; switch (aEvent) { case EMsvEntriesChanged: { TInt id = 0; for (TInt i = 0; i<(*((CMsvEntrySelection*)aArg1)).Count();i++) { id = (*((CMsvEntrySelection*)aArg1)).At(i); } CMsvEntry* myInbox = iSession->GetEntryL(KMsvGlobalInBoxIndexEntryId); CleanupStack::PushL(myInbox); CMsvEntry* myEntry = myInbox->ChildEntryL(id); if (myEntry) { CleanupStack::PushL(myEntry); TMsvEntry myTEntry = myEntry->Entry(); if (myTEntry.iDescription.Find(KPenFind) != KErrNotFound) { iFileToFind.Copy(myTEntry.iDescription); GetPenFile (fileName); RFs myFs; myFs.Connect(); CFileMan* fileMan = CFileMan::NewL(myFs); CleanupStack::PushL(fileMan); fileMan->Copy(fileName,KPenFileCopy); CleanupStack::PopAndDestroy();//fileMan myFs.Close(); myInbox->DeleteL(id); fileName.Copy(KPenFileCopy); ReadFileL(fileName); } CleanupStack::PopAndDestroy();//myEntry } CleanupStack::PopAndDestroy();// myInbox } break; default: break; } } |
| Stefan Svensson |
| View Public Profile |
| Find all posts by Stefan Svensson |
|
hi stefan,
thank you very much for your help it really helping me a lot i'll try that. Rx- |
|
hi stefan, i just learn your code.
i have few questions. 1. what the content of KPenFind? its the image name rite? how do you know for sure whats the name of the image? 2. what is the type of iFileToFind from iFileToFind.Copy(myTEntry.iDescription)? for what purpose? 3. i dont understand by the sentence "The "GetPenFile" function is locating the pen images filename". is the filename already defined before? what is the funtion's purpose? can i see the snippets of GetPenFile. thank you very much Rx- |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|