How can I sense if a phone is in standby or sleep mode(dor Nokia)?
I need to sense a phone's status. If it is sleep or standby mode I have to change my app's running code (to save power consumption). Is this supported by 开发者_运维知识库the JavaME API? ( for Nokias)
AFAIK Its difficult to achieve with j2me. But see this existing post. Here AlexR said the one solution. you can try like that. May be it helps you.
From what I remember, MIDlet.pauseApp()
gets called when the phone enters sleep/standby mode. Not sure about that, but it shouldn't be hard to check if this works.
精彩评论