Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User Eng-Khaled's Avatar
    Join Date
    Jul 2010
    Posts
    8
    use that property to get battery level,
    property = System.getProperty("com.nokia.mid.batterylevel"))
    Using eclipse+eclipseME+WTK-2.5.2CLDC
    MIDP 2.0
    and
    CLDC 1.1
    and i store value of property
    value=Integer.parseInt(property)
    when
    Launch as emulated Java ME MIDlet
    it throws Exception NumberFormatException: null

  2. #2
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    This property only works on Nokias, and only works on some Nokia phones.

    It won't work in the WTK emulator.

    Graham.

  3. #3
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Some of the system properties may return null as they may not be supported on early devices and some system properties require the MIDlet to be trusted otherwise return null...
    If my memory serves me correctly then this works only on 3rd edition FP2 (with com.nokia.mid.batterylevel system property).

    Therefore this is very important to note the device family that will work with this property.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Cannot retrieve battery info on Samsung mobile phone.
    By balanikas in forum Symbian C++
    Replies: 13
    Last Post: 2009-01-08, 07:30
  2. Battery Charge level & Info: Model Support?
    By justteam in forum Symbian C++
    Replies: 1
    Last Post: 2007-01-11, 15:26
  3. Battery Charge level & Info: Model Support?
    By justteam in forum Symbian C++
    Replies: 1
    Last Post: 2007-01-11, 14:57
  4. Battery Charge level & Info: Model Support?
    By justteam in forum Mobile Java General
    Replies: 1
    Last Post: 2007-01-11, 14:57
  5. Battery status check (mobile s60 )
    By Mdiaw2006 in forum Symbian C++
    Replies: 3
    Last Post: 2006-07-20, 10:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved