×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Send image via MMS

    Hi Experts
    Unfortunately, I did not have my data sent by calldata.
    Now I want to send them via MMS.
    I started with this code, but it failed and no error displayed:

    CMsvSession* iMMSSession; // Client session on the message server
    CMmsClientMtm* iMmsClientMtm; // Message Type Module (MMS)
    CClientMtmRegistry* iMMSMtmReg;
    iMMSSession = CMsvSession::OpenAsyncL(*this);


    iMMSMtmReg = CClientMtmRegistry::NewL(*iMMSSession);
    iMmsClientMtm = (CMmsClientMtm*)iMMSMtmReg->NewMtmL(KUidMsgTypeMultimedia);
    iMmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId);
    iMmsClientMtm->CreateMessageL(iMmsClientMtm->DefaultSettingsL());
    _LIT(KPhoneNumber, "+6597451780");
    iMmsClientMtm->AddAddresseeL(KPhoneNumber);
    _LIT(KAttachmentFilename, "E:\\Images\\abdou.jpg");
    TBufC8<20> KAttachmentMIMEType = _L8("image/jpeg");
    TMsvId attachmentId = KMsvNullIndexEntryId;
    iMmsClientMtm->CreateAttachment2L(attachmentId, KAttachmentFilename);
    iMmsClientMtm->SetAttachmentTypeL(attachmentId, KAttachmentMIMEType);
    //iMmsClientMtm->SetMessageRootL(attachmentId);
    TMsvEntry ent = iMmsClientMtm->Entry().Entry(); ent.SetInPreparation(EFalse); ent.SetVisible(ETrue);
    //iMmsClientMtm->Entry().ChangeL(ent); // Commit changes SaveMessageL();
    //CMsvOperationWait* wait = CMsvOperationWait::NewLC();
    //wait->iStatus = KRequestPending;
    iMmsClientMtm->SendL(0);
    //CleanupStack::PushL(op);
    CActiveScheduler::Start(); // returns when wait completes

    CleanupStack::PopAndDestroy(2);

    Who can guid me

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Send image via MMS

    Have you checked the MMS example from the exmaples section already ?
    It actually has all necessary codes for sending a MMS with image as an attachment, thus just check it out and you'll get it working just fine.

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: Send image via MMS

    yes i use the MMS Example in the SDK designed for 3 and 2 edition.
    This code is from this example

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Send image via MMS

    if your application is crashing, you should try getting the panic code from the process when it exits. Ot you could try TRAPping the error. With both cases you should try checking on which line gives the error.

    anyway, it looks like that you have modified the original code, so please check again with original implementation, see that it works, and then try copying the code excatly to get it working on your project.

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: Send image via MMS

    Thank you for the replay,
    This example work fine in S60 3rd. But i want to do it in S60 2ed
    error : *RCOMP failed
    Last edited by abdelbakiguesmi; 2009-06-01 at 11:59.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Send image via MMS

    Consider reading the other error messages too.

  7. #7
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: Send image via MMS

    OK,
    When i install the .sis this application work fine
    Now i want to rebuild it. A error displayed about the path of .app in pkg file.
    What can i do???

  8. #8
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: Send image via MMS

    Thank you symbianyucca
    It work fine in my device

Similar Threads

  1. Send a MMS Message in my image viewr application
    By ehdgh32 in forum General Messaging
    Replies: 1
    Last Post: 2009-04-09, 13:28
  2. send an MMS message by PC
    By lisalab in forum General Messaging
    Replies: 5
    Last Post: 2004-08-10, 10:14
  3. Recommended Sizes for MMS Image, Text and Layout
    By sguthery in forum General Messaging
    Replies: 3
    Last Post: 2003-08-22, 09:10
  4. MMS with image
    By abem07 in forum General Messaging
    Replies: 1
    Last Post: 2003-07-08, 15:35
  5. a way to send 2 image, 1 sound mms message???
    By crony94 in forum General Messaging
    Replies: 1
    Last Post: 2003-03-06, 00:14

Posting Permissions

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