views:

50

answers:

2

Hi... I am developing a mobile game in j2me and i am using mobile nokia 6300. In game canvas i used hideNotify() to change game into pause mode when external and internal events occurs. But when sms received ,its doesn't change to pause mode and game will continue. Any idea to handle message event in j2me.

+1  A: 

Unless the SMS is intended for your midlet (i.e. it's directed to a port you are listening on), you have no way of knowing about it.

funkybro
A: 

There may be some differences in the way how phone has implemented pause handling. I have observed two behaviors:

  • In one case pause is handled with just hideNotify/showNotify calls on the canvas.

  • In other instances I have seen system calling MIDlet.pauseApp() for pausing and MIDlet.startApp() for resuming.

By covering both cases, You should be fine

JaanusSiim