×

Discussion Board

Results 1 to 15 of 34

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Pune - India
    Posts
    378

    Unhappy [moved] Receiving SMS silently..

    Hello Friends,

    I am working on series 60 2nd edition.
    I want to receive messages without any tone, without blink of light and without vibration alert.
    can anybody give me example or some guidence regarding this..
    Its urgent..


    Thanking you in advance...

  2. #2
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: Receiving SMS silently..

    Quote Originally Posted by amol_benare604 View Post
    Hello Friends,

    I am working on series 60 2nd edition.
    I want to receive messages without any tone, without blink of light and without vibration alert.
    can anybody give me example or some guidence regarding this..
    Its urgent..


    Thanking you in advance...
    check this link
    http://discussion.forum.nokia.com/fo...d.php?t=112852
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Pune - India
    Posts
    378

    Re: Receiving SMS silently..

    This is the code i m using ..
    I hav inserted code snipet from link provided by you but its not working....can u plz guide me...

    case EMsvEntriesChanged:
    // Look for changes. When using the emulator observed folder is drafts, otherwise inbox.
    if (*(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    if (iNewMessageId == entries->At(0))
    {
    // Set entry context to the new message
    iMsvEntry->SetEntryL(iNewMessageId);

    //New Development

    /*iMsvEntry->CreateL(entry);

    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    iMsvEntry->ChangeL(entry);
    }*/
    TMsvEntry entry(iMsvEntry->Entry());
    //entry.SetVisible(EFalse);
    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    iMsvEntry->ChangeL(entry);
    }








    // Check the type of the arrived message and that the message is complete.
    // only SMS are our consern
    if ( iMsvEntry->Entry().iMtm != KUidMsgTypeSMS || !iMsvEntry->Entry().Complete() ) {
    return;
    }

    // Read-only store.
    CMsvStore* store = iMsvEntry->ReadStoreL();
    CleanupStack::PushL(store);

    // Get address of received message.
    iLogView->LogEventBeginningL();
    TBuf<KSmsMessageLength> address ( iMsvEntry->Entry().iDetails );
    iLogView->DrawTextL( address );

    if (store->HasBodyTextL())
    {
    CRichText* richText = CRichText::NewL(
    iEikonEnv->SystemParaFormatLayerL(),
    iEikonEnv->SystemCharFormatLayerL());
    CleanupStack::PushL(richText);
    store->RestoreBodyTextL(*richText);
    const TInt length = richText->DocumentLength();

    TBuf<KSmsMessageLength> number;
    TPtrC ptr = richText->Read(0, length);

    // Try to find a number that has 10 or more digits from message body.
    // Underline found number.
    if ( iParser->ParseMessage( ptr, number ))
    {
    // Search number position in the message body
    TInt pos = richText->Read(0, length).Find( number );

    iLogView->DrawTextWithoutCarriageL( richText->Read(0, pos) );
    iLogView->DrawUnderlinedTextL( richText->Read(pos , number.Length()) );
    iLogView->DrawTextWithoutCarriageL( richText->Read(pos + number.Length() , length));
    }
    else
    {
    iLogView->DrawTextL( richText->Read(0, length) );
    }
    CleanupStack::PopAndDestroy(richText);
    }
    else
    {
    iLogView->DrawTextL( KNoBodyText );
    }

    CleanupStack::PopAndDestroy(store);

    // Automatic delete setting
    if ( iAutomaticDelete )
    {
    // Ncnlist seems to panic if there is no time to play arrived
    // message tone before deletion.
    User::After(1000*3000);
    iLogView->LogEventBeginningL();
    iLogView->DrawTextL( KAutomaticDeletedMesssageText );
    iMsvSession->RemoveEntry(iNewMessageId);
    }
    }
    }
    break;

  4. #4
    Registered User
    Join Date
    Feb 2008
    Location
    India
    Posts
    92

    Re: Receiving SMS silently..

    Hi,

    Check this link.


    Regards,
    Suyash

  5. #5
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Receiving SMS silently..

    The link Suyash provided will help only if you want to receive the message via sockets. In case, you feel its "difficult" or you don't want to do it in that manner, you can still achieve what you want by simply marking the message as "read" as soon as you receive the notification in EMsvEntriesCreated. You can do it using the code below,

    Code:
    /**
     * Just in case we need such a function in future that marks a message as "read"
     * @return - NONE
     * */
    void SMSMonitor::MarkMsgAsRead()
    {
        // There is an own registry for UI MTM's.
       iMtmUiReg = CMtmUiRegistry::NewL( *iSession );
    
       CMsvEntry* serverEntry = iSession->GetEntryL( iMessageId );
       CleanupStack::PushL( serverEntry );
    
       // Create new MTM.
       CBaseMtm* clientMtm = iMtmRegistry->NewMtmL( serverEntry->Entry().iMtm );// );
    
       CleanupStack::PushL( clientMtm );
       clientMtm->SwitchCurrentEntryL( serverEntry->EntryId() );
    
       TMsvEntry entry( serverEntry->Entry() );
       entry.SetNew( EFalse );         // message is no longer new
       entry.SetUnread( EFalse );      // message is no longer unread
       serverEntry->ChangeL( entry );  // commit changes
       CleanupStack::PopAndDestroy( 2 ); // clientMtm, serverEntry
    }
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Pune - India
    Posts
    378

    Smile Re: Receiving SMS silently..

    Thanks a lot friends,
    I got solution for my problem because of u guies only thank you very much...

Similar Threads

  1. receiving a wap push message silently
    By cmryan in forum Symbian
    Replies: 10
    Last Post: 2009-06-03, 15:15
  2. Receiving SMS by J2ME Midlet on 3410
    By mlamb in forum Mobile Java General
    Replies: 6
    Last Post: 2009-03-24, 13:13
  3. [moved] Receiving WAP Push message
    By doctordwarf in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2008-10-01, 06:20
  4. Receiving a WAP-PUSH SMS
    By coolste23 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-07-26, 01:05
  5. Sms Problem!!! Not Receiving
    By zmaster_d in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2007-07-18, 20:38

Posting Permissions

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