×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    few mixed queries on local sms and database

    hi all respected forum members,i am new with symbian development, i would like to ask few things regarding symbian s60 development in carbide.

    how can we create and use 2D array in carbide.

    if i want to block sms from certain numbers. now i want user to enter the numbers from which he do not want to recieve sms. so a dialog box appears and user adds a number. so, where can i store and use those numbers so that it does not vanishes if application exits.

    and once i have created a local sms in my inbox. it doesnot show reply option rather it shows forward option and also it shows "TO" instead of "From"

    looking forward towards ur kind help....

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,675

    Re: few mixed queries on local sms and database

    Quote Originally Posted by yahoo2010 View Post
    how can we create and use 2D array in carbide.
    Carbide.c++ is an IDE, a smart text editor. Since Symbian C++ is C++, you can obviously create arrays in the usual C++ way, like
    Code:
    int a[20][20];
    Dynamic arrays also work, you can use both the C++ way (new[] operator), or stack Symbian C++ array types with thin wrappers (like RPointerArray of CArrayFixFlat for example.
    if i want to block sms from certain numbers. now i want user to enter the numbers from which he do not want to recieve sms. so a dialog box appears and user adds a number. so, where can i store and use those numbers so that it does not vanishes if application exits.
    Files can help in that, RFile is the class. If you generate a new project with Carbide.c++, it already shows some file usage ('Hello From File' command), the Wiki may contain some related examples.
    and once i have created a local sms in my inbox. it doesnot show reply option rather it shows forward option and also it shows "TO" instead of "From"
    it is controlled by the PDU type: the default PDU is CSmsSubmit, which gets a To: address when displayed, incoming messages are CSmsDeliver ones. I think the related Wiki article contains this detail, check it once more
    looking forward towards ur kind help....
    do not trash the feedback board, these questions do not differ from your other questions, so they should have been posted to the Symbian C++ boards like those. Anyway, this thread is going to be moved there now.

  3. #3
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    hi wizard-hu..thnx to u..i have successfully read and write.....now my problem is that i have recived a input from user stored in the file, and also present in buffer........so how can i use this buffer which is decalred in myAppUi.cpp in another class....
    in short how to use a buffer declared in myAppUi.cpp in another class present in soc.cpp..

    thnx

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: few mixed queries on local sms and database

    you can access your Application AppUI from any class using

    AppUI() where

    Code:
    #define AppUI() ((CmyAppUi*)CCoeEnv::Static()->AppUi())
    or you can pass the CmyAppUi class point/referance to your required class.

  5. #5
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    Quote Originally Posted by skumar_rao View Post
    you can access your Application AppUI from any class using

    AppUI() where

    Code:
    #define AppUI() ((CmyAppUi*)CCoeEnv::Static()->AppUi())
    or you can pass the CmyAppUi class point/referance to your required class.
    i added this code in my soc.cpp "#define AppUI() ((CSMSSPAM2AppUi*)CCoeEnv::Static()->AppUi()) "
    and thn tried to access buffer in appui by this..... buffer2.copy(AppUI( ).Buffer)

    but unable to do so.

  6. #6
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    got it working.

    thanx skumar_rao

  7. #7
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    i am not able to add reply option in the LOCAL SMS, and also not able to change 'To' to 'From'.......help needed

  8. #8
    Regular Contributor
    Join Date
    Dec 2008
    Location
    india
    Posts
    179

    Re: few mixed queries on local sms and database

    to change 'To' to 'From......try tiz.....


    CParaFormatLayer* paraFormatLayer = CParaFormatLayer::NewL();
    CleanupStack::PushL(paraFormatLayer);

    CCharFormatLayer* charFormatLayer = CCharFormatLayer::NewL();
    CleanupStack::PushL(charFormatLayer);

    CRichText* richText = CRichText::NewL(paraFormatLayer,charFormatLayer);
    CleanupStack::PushL(richText);



    CRichText& body = iSmsMtm->Body();
    body.Reset();
    body.InsertL(0, iMessage);

    CMsvStore* messageStore = iSmsMtm->Entry().EditStoreL();
    CleanupStack::PushL( messageStore );
    // To make programmatically created message display "From", not "To"
    // in the Messaging application, it is needed to store the ESmsDeliver PDU
    // into the message header
    CSmsHeader* header = CSmsHeader::NewL( CSmsPDU::ESmsDeliver, *richText );
    CleanupStack::PushL( header );
    header->StoreL( *messageStore );
    CleanupStack::PopAndDestroy( header );
    messageStore->StoreBodyTextL( *richText );
    messageStore->CommitL();
    CleanupStack::PopAndDestroy( messageStore );
    Regards:
    ManmayG

  9. #9
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    how to change 'forward' option to 'reply' in the inbox meesage

  10. #10
    Regular Contributor
    Join Date
    Jul 2010
    Posts
    159

    Re: few mixed queries on local sms and database

    waiting for reply... anyone plzzzz
    how can i add reply option instead of present forward option in my local generated sms...

Similar Threads

  1. Custom Local Database on 5th Edition
    By b.tiru.naidu in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2010-06-09, 15:24
  2. local database for application on N95 mobile
    By burinutit in forum Mobile Java General
    Replies: 7
    Last Post: 2010-06-05, 07:52
  3. symbian SyncML can not open local database??
    By wudelei in forum Symbian
    Replies: 0
    Last Post: 2010-04-29, 05:06
  4. Replies: 0
    Last Post: 2005-10-07, 08:42
  5. Opening a local database file
    By ppezziardi in forum Mobile Java General
    Replies: 4
    Last Post: 2003-05-08, 14:02

Posting Permissions

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