Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2008

    How can i wait ( and process) to bluetooth message

    Hi ,
    I'm trying to listen to incoming BT massage and get their content in Symbian C++.
    I try with MTM ( to get the last income massage via OBEX ) but i cant access it's content
    (The program is failed , attached relevant code , failed on last line)
    		case EMsvEntriesCreated:
    			//Listening when new message is arrived in inbox
                if (aArg2 &&  *(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
                    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
                    if( entries->Count() >= 1 )
                        _LIT(KMessageReceived, "Message received.");
    					CMsvEntry* iMsvEntry = iSession->GetEntryL(entries->At(0));
    					CMsvStore* iMsvStore = iMsvEntry->ReadStoreL();
       // Store the original message text
    				    CParaFormatLayer* pf = CParaFormatLayer::NewL();
    					CleanupStack::PushL( pf );
    					CCharFormatLayer* cf = CCharFormatLayer::NewL();
    					CleanupStack::PushL( cf );
    					CRichText* richText = CRichText::NewL( pf, cf,
    					                                       CEditableText::EFlatStorage );
    Is it the way to access Content of msgs ?

    Regards ,

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: How can i wait ( and process) to bluetooth message

    You should always check the panic code: http://wiki.forum.nokia.com/index.ph...ded_panic_code
    There are a number of possible problems with your code:
    - by the time the message entry is created, it is empty. Check any messaging examples, and you will see that they are accessing the new messages after an EMsvEntriesChanged event occurs
    - you should check CMsvStore::HasBodyTextL
    - it is absolutely not sure that BT OBEX messages would have body, so check for attachments as well.

Similar Threads

  1. Replies: 35
    Last Post: 2009-04-11, 14:36
  2. Replies: 6
    Last Post: 2009-03-25, 07:10
  3. Cannot get wait note to display
    By ahlmans in forum Symbian
    Replies: 2
    Last Post: 2008-07-24, 10:49
  4. Process termination check
    By prasanta_sadhukhan in forum Symbian
    Replies: 3
    Last Post: 2007-03-31, 16:27
  5. Why I cann't send message? HelP!
    By starryshen in forum Symbian
    Replies: 4
    Last Post: 2004-03-21, 07:03

Posting Permissions

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