This page was last modified 18:19, 3 September 2007.
Sending Files Over Bluetooth Using RSendAs
From Forum Nokia Wiki
This small snippet shows how to send a file over Bluetooth using the RSendAs class present on S60 3rd edition devices.
RSendAs sendas;
// Connecting to the SendAs server
TInt res = sendas.Connect();
User::LeaveIfError(res);
CleanupClosePushL(sendas);
RSendAsMessage message;
// Selecting the appropriate Bluetooth MTM UID
TRAP(res, message.CreateL(sendas, KSenduiMtmBtUid));
User::LeaveIfError(res);
CleanupClosePushL(message);
// The file we’re going to push, you need to make sure that the file
// is present on the device
_LIT(KFile, "C:\\pushfile.txt");
// Constructing the message
TRequestStatus status;
message.AddAttachment(KFile(), status);
User::WaitForRequest(status);
User::LeaveIfError(status.Int());
CleanupStack::Pop(1); // RMessage
// Launch the dialog allowing us to choose a receiver
// device and send the file
TRAP(res, message.LaunchEditorAndCloseL());
User::LeaveIfError(res);
CleanupStack::PopAndDestroy(1); // RSendAs
You need to include the following files:
- #include <rsendas.h>
- #include <rsendasmessage.h>
- #include <senduiconsts.h>
Finally you must link against the following library:
- sendas2.lib
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bluetooth connection with PC | AzuManga | Symbian Networking & Messaging | 1 | 2005-12-05 20:15 |
| Opening jar files in nokia 6230i | bvsbh | Mobile Java General | 9 | 2006-02-03 06:14 |
| Can't get my 6600 working with my BMW bluetooth system... | ledide | Bluetooth Technology | 20 | 2005-02-14 15:09 |
| How do I get my java application (.far file) from my PC to my 3650? | davideikeland | General Discussion | 0 | 2003-11-11 20:12 |
| Sending files using BT to specific folder (S60 to S40, S60) | WinHw | Symbian Networking & Messaging | 1 | 2006-08-14 13:53 |
