×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    3

    blinking lights on unread sms or missed call

    Hi All,
    I'm new to Symbian programming, so be gentle :)
    I've got Nokia N82 and was wandering if it is possible to make phone keyboard blink if I have unread sms or missed calls. I know how get the numbr of unread sms and missed calls, I even know hao to make lights blink(at least I think I know). What I do not know how to emulate blinking lights on the emulator (I'm using 3d edition). Or maybe I'm doing something wrone.
    Some code (whith executes but does nothing):

    CHWRMLight* light; //defined in headeer file
    void CUnreadMsgCalc :: HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3 )
    {
    switch( aEvent )
    {
    case EMsvServerReady:
    case EMsvEntriesCreated:
    case EMsvEntriesChanged:
    case EMsvEntriesDeleted:
    case EMsvEntriesMoved:
    {
    iCalcCompleted = EFalse;
    CalcUnreadEntriesL( KMsvGlobalInBoxIndexEntryId, iNewMsgCount ); // reading global indox

    if (iNewMsgCount>0)
    {
    int status = light->LightStatus(CHWRMLight::EPrimaryDisplay);
    int off = CHWRMLight::ELightOff;
    int on = CHWRMLight::ELightOn;
    if (status == off || status == on)
    light->LightBlinkL(CHWRMLight::EPrimaryKeyboard);
    }
    else light->LightOffL(CHWRMLight::EPrimaryKeyboard);

    iCalcCompleted = ETrue;
    } break;

    default:
    break;
    }
    }

  2. #2
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    156

    Re: blinking lights on unread sms or missed call

    Quote Originally Posted by begiz View Post
    What I do not know how to emulate blinking lights on the emulator (I'm using 3d edition).
    Hi, begiz, are you sure that blinking lights are working on the emulator? I was sure that they are not...
    Anyway, check your code on a real device. It sould be working.
    Regards,
    Mr.Y

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    3

    Re: blinking lights on unread sms or missed call

    Thanks for the reply,
    I was unsure of that actually, but I wanted to test my app. Because I've tried it on my phone and nothing happed at all. So I'm unaware where is the problem, I cant debug it. I've even tried to turn lights on without checking the unread sms.

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

    Re: blinking lights on unread sms or missed call

    only way to resolve your problem is by debugging, try File / device debug method on device.

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    156

    Re: blinking lights on unread sms or missed call

    Quote Originally Posted by begiz View Post
    Thanks for the reply,
    I was unsure of that actually, but I wanted to test my app. Because I've tried it on my phone and nothing happed at all. So I'm unaware where is the problem, I cant debug it. I've even tried to turn lights on without checking the unread sms.
    Hi, begiz
    I used the same code in the similar situaton a year ago, it worked. If you want, i can rechecked it and report to you.
    Regards,
    Mr.Y

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    3

    Re: blinking lights on unread sms or missed call

    Hi, it would be really cool, beacause I cant make it work for some reason... I dont know if is beacause of my active scheduler wich checks for unread sms or some thing else... will be waiting for your reply :)

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: blinking lights on unread sms or missed call

    Remember that it is usually possible testing such code fragments individually. So if your code is supposed to drive a car, wash up, blink the lights, check for unread messages, and somehow the lights do not blink, you may consider generating a new application, and putting those 5-6 lines into its HandleCommandL for example.

  8. #8
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Re: blinking lights on unread sms or missed call

    Hi, I'm working on the same problem
    I've implemented a similar code in active objects and tried the following:
    - add these objects to a console background app that starts at system startup
    - add the same to a gui app
    In the case of gui app it works well, but only when the app window is active (in foreground). And in the case of console app it does NOT at all.
    I think this is because an app is allowed to control device lights only when it is in foreground.
    The call of light->ReserveLightL(CHWRMLight::EPrimaryKeyboard,EFalse,ETrue) would allow the app to control the lights both in foreground and background states, but as SDK says setting the 3rd parameter to ETrue is allowed for trusted clients only, see http://discussion.forum.nokia.com/fo...d.php?p=442949
    Making a GUI app doesn't make sense, since I need my app to work as a background service - it must blink with keyboard on new messages / missed calls, like a dedicated message led does on some phones (like Nokia E-50, E-51).
    Does anyone know a solution? please help!

Similar Threads

  1. making a call and creating a new sms
    By amjedab in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-10-23, 05:52
  2. Free VIOP SMS and Internet call from UK abroad during 2007
    By jimgilmour1 in forum News and Announcements
    Replies: 0
    Last Post: 2007-10-10, 12:18
  3. How to get missed call list.....
    By ineelabh in forum Symbian
    Replies: 4
    Last Post: 2007-09-18, 08:44
  4. Missed call and incoming message indicator
    By saviourcat in forum Symbian
    Replies: 0
    Last Post: 2006-07-05, 10:25

Posting Permissions

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