02-08-2012 02:16 AM
My app need update security data in real time,so it should be able to run well even the PB switch to standby state.
The problem is that when PB changed to standby state and more than one hour later,my app can't send data request to the server by socket(at the beginning it workd well),even when the PB get actived again,the socket connection is also unuseful.
I have done some try as followed:
1,I have added the '<inactivePowerMode>throttled</inactivePowerMode>' into the blackberry-tablet.xml
2,I have add some event listiner in main class, but all of them can not be fired in any time.
stemEvent.STANDBY,onDeactive); QNXSystem.system.addEventListener(qnx.events.QNXSy stemEvent.ACTIVE,onActive); QNXSystem.system.requestResource(QNXSystemResource .NETWORKING); stage.addEventListener(Event.USER_IDLE,userIdle); stage.addEventListener(Event.USER_PRESENT,userPres ent); stage.addEventListener(Event.ACTIVATE,onStageActiv e); stage.addEventListener(Event.DEACTIVATE,onStageDea ctive);
3,I have set a timer to log some infomation into /shared folder.it worked well in standby state.
Thanks for any reply.
Solved! Go to Solution.
02-08-2012 03:31 AM - edited 02-08-2012 03:32 AM
I am a developer of the Instant Messenger which is connected to the gate via socket. What I can tell you for sure i that You need to use:
Than, use SocketMonitor in order to be sure that connection is available, some WiFi routers may shut down idle connection event when U don't want to! so U need to reconnect in such cases.
Please, feel free to ask for the more assistance.