You Are Here:

Community: Developer Discussion Boards

#1 Old SU-1B connect to 3650 apps - 2004-02-25, 09:09

Join Date: Feb 2004
Posts: 130
Rx-lee
Offline
Regular Contributor
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.
Reply With Quote

#2 Old 2004-03-01, 12:50

Join Date: Mar 2004
Posts: 1
Stefan Svensson
Offline
Registered User
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;
}
}
Reply With Quote

#3 Old 2004-03-01, 13:07

Join Date: Feb 2004
Posts: 130
Rx-lee
Offline
Regular Contributor
hi stefan,
thank you very much for your help
it really helping me a lot
i'll try that.

Rx-
Reply With Quote

#4 Old 2004-03-03, 13:30

Join Date: Feb 2004
Posts: 130
Rx-lee
Offline
Regular Contributor
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 With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia