Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Sending files with SendUi

From Wiki
Jump to: navigation, search
Article Metadata
Created: symbianyucca (10 Apr 2007)
Last edited: hamishwillee (30 May 2013)

CSendUi API in 3rd edition and CSendAppUi API in pre-3rd edition is probably the easiest way on sending files from Symbian S60 devices. Note that it has internal protection against sending copy protected content, thus you can not send some files for example SIS files with it.

First define following member variables in your class definition:

#ifdef __SERIES60_3X__
CSendUi* iSendUi;
CSendAppUi* iSendUi;

The indef with __SERIES60_3X__ will make sure that code compiled for 3rd edition will use CSendUi and other platforms will use CSendAppUi. Then to construct the SendUi instance, just add following lines into the ContsructL()-function of your class.

#ifdef __SERIES60_3X__
iSendUi = CSendUi::NewL();
iSendUi = CSendAppUi::NewL(0);

Which after you can add your files to be sent into descriptor array and then you can use the following function to send the files out from the phone.

// Includes needed
#include <sendui.h>
#include <cmessagedata.h>
// Implementation>
void CreateAndSendMessageL(CDesCArray* aArray)
if(aArray && iSendUi)
TSendingCapabilities MySendCapa;
MySendCapa.iFlags = TSendingCapabilities::ESupportsAttachments;
#ifdef __SERIES60_3X__
CMessageData* Mymessage = CMessageData::NewLC();
for(TInt i=0; i< aArray->Count(); i++)
TUid MyServiceUid = iSendUi->ShowSendQueryL(Mymessage,MySendCapa);
CleanupStack::PopAndDestroy( Mymessage);

The Sending function will cause SendUi to pop up selection list box filled with possible methods for sending the files, and selecting one will cause files to be sent with selected method.

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 30 May 2013, at 04:35.
27 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.