Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2006

    Question Battery Charge level & Info: Model Support?


    I need to get battery charge level for my application, and I've tried the code below that uses etelbgsm.h:

    TBuf<50> aValue;
    MBasicGsmPhoneBatteryAndPower::TBatteryInfo binfo;
    TInt test = phone.GetBatteryInfo(binfo);
    if (test == KErrNone)
    aValue.Format(_L("BATT CHARGE LEVEL: %d"), binfo.iChargeLevel);

    switch (binfo.iStatus)
    case MBasicGsmPhoneBatteryAndPower::EPoweredByBattery:
    aValue.Append(_L("BATTERY POWERED"));
    case MBasicGsmPhoneBatteryAndPower::EBatteryConnectedButExternallyPowered:
    aValue.Append(_L("EXT PWR CONNECTED"));
    case MBasicGsmPhoneBatteryAndPower::ENoBatteryConnected:
    aValue.Append(_L("NO BATT CONNECTED"));
    case MBasicGsmPhoneBatteryAndPower::EPowerFault:
    aValue.Append(_L("POWER FAULT"));

    I've tested the code on Nokia 6630 and looks like "test" results in KErrNotSupported.

    Can anyone tell my what models are supported by this API? or suggests another API?

    My target SDK is 2nd edition.



    P.S. I've also tried:

    RSystemAgent systemAgent;
    TInt strength = systemAgent.GetState(KUidBatteryStrength);

    But the application panics when connecting to the system agent!
    Welcome Symbian ;-)

  2. #2
    Registered User
    Join Date
    Jul 2005
    Bengaluru, India

    Re: Battery Charge level & Info: Model Support?

    Goto Technical Library and search for:TSS000338.

Similar Threads

  1. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  2. Sound.FORMAT_WAV and Nokia Phone Model Support
    By gregr170 in forum Mobile Java General
    Replies: 3
    Last Post: 2003-05-22, 13:44
  3. Does the PC Connection SDK support WTAI the Call Control model?
    By kenrwilson in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2002-10-04, 12:12
  4. DTL-1 Connectivity Pack Support and Updates - IMPORTANT INFO
    By andygascoigne in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-07-12, 04:57
  5. What model does support wml push?
    By nokia_5 in forum Mobile Web Site Development
    Replies: 2
    Last Post: 2002-06-18, 11:50

Posting Permissions

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