×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    22

    CAknGlobalNote hangs phone without launching dialog

    Code:
    //Belongs to some library called Core.lib which is statically linked
    EXPORT_C TInt UIUtils::ShowGlobalNoteL(const TDesC& aMessage)
        {
        TBool buttonPressed = EFalse;
    #if !defined(__UIQ_3X__)
        TRequestStatus status;             
        CAknGlobalNote* dialog = CAknGlobalNote::NewLC();
        dialog->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);
        dialog->SetTone(CAknQueryDialog::EWarningTone);
        dialog->SetAnimation (R_QGN_NOTE_WARNING_ANIM);
        dialog->ShowNoteL(status, EAknGlobalWarningNote, aMessage);
        User::WaitForRequest(status);
        buttonPressed = (status.Int() == EAknSoftkeyOk);
        CleanupStack::PopAndDestroy(dialog);         // pop dialog
    #endif
        return buttonPressed;
        }
    
    
    CMyClient::LaunchDialog()
        {
        UIUtils::ShowGlobalNoteL(_L("dialog message"));
        }

    //The client code hangs the phone without displaying dialog, what I observed is that its making my app to hang. The positive cases with this dialog.

    1. If I use this method making the member of this class, then works fine.
    2. If I use without User::WaitForRequest(status); making it a self closing after sometime, then also goes well watever the case whether it is statically linked library method orelse member method.



    1. Can anybody give me any solution why User::WaitForRequest() method makes my application to hang without launching the dialog.
    2. Anything I can do not to fix this approach to work.
    3. Do I need to sacrifice this approach and go to waiting dialog. But I am not sure that Waiting dialog can be displayed top of the applications even the luancher of that application goes to background.

    Kindly help me in this issue and send some example if possible.

    Thanks
    symadept@gmail.com
    Thanks
    symadept@gmail.com

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

    Re: CAknGlobalNote hangs phone without launching dialog

    you could try this:

    CAknGlobalNote* dialog = CAknGlobalNote::NewLC();
    TInt NoteId = dialog->ShowNoteL(EAknGlobalInformationNote,aMessage);
    User::After(2000000);
    dialog->CancelNoteL(NoteId);
    CleanupStack::PopAndDestroy(dialog);

Similar Threads

  1. Serious error in Nokia 6600: Hangs on Image.getRGB and Image.createRGBImage
    By appeal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2007-09-12, 11:27
  2. I can't reinstall PC Suite Support into my phone
    By rulirahm in forum PC Suite API and PC Connectivity SDK
    Replies: 3
    Last Post: 2006-06-12, 08:49
  3. http. Phone hangs.
    By xdimas in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-06-06, 09:11
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  5. Card phone hangs on MPAPI
    By lkussy in forum Multimodecards
    Replies: 0
    Last Post: 2002-07-19, 11:00

Posting Permissions

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