I am running an app. The app has two canvases. One is a normal one, the other is FullCanvas for the actual game. The normal one is for the main menu and splash screens.
When we receive a call, we have an interesting situation that occurs.
When the call comes in, we ignore it and continue playing the game.
If we quit the game, returning back to the Games Folder and then start the game again, we immediately get a screen that displays
1 missed calls
This screen has the softkeys List and Exit
Once we hit Exit, the game has already started. Which means any splash screen in the game has already passed. Where we are in the game is dependent upon how long we waited to press Exit. So if we hit Exit quickly, we see the splash screens. If we wait, we will get to the main menu screen.
One thing to mention is that we are handling incoming calls and sms with pauseApp. We never supported Nokia phones before and are now. Reading threads seems to indicate that pauseApp is not supported, so we will have to use hideNotify/showNotify. I am assuming that startApp does not work right either in this case?
Has anyone encountered this problem?
Also, is it fair to assume that I can use a simple flag to protect my switching between normal canvas and full canvas?
Basically yes, you have the right idea, Nokia phones dont use pauseApp, they only call hide/showNotify(). If its really essential that your users see the splash screen you can use this.isShown() to determine if the canvas is being shown.
Okay, the isShown works. The problem, however, still remains. That when I quit the game after receiving and ignoring an incoming phone call, return to the Games Folder, and then start the app, the Missed Call screen pops up. No other game does this. The other games pop up that message when you leave the Game Folder.
Am I maybe destroying the app wrong? This is stange, since the 3650 and 6225 do not do this.
I think it could be because you are switching canvases, there is therefore a probably a short time when there is nothing displayed on the screen (i.e. when setCurrent is called it actually does something like setCurrent(null); setCurrent(nextCanvas);so the dialog can popup. I can say that I have not had this problem and I never switch canvases. Maybe try making a test case for it. Godd luck
Thanks. Just curious. Does this mean that you do either full Normal Canvas or full FullCanvas? I notice that some Nokia games seem to support softkeys for menus and then none (FullCanvas) for the game. Since FullCanvas does not support commands, my solution was to use normal Canvas for main menus and FullCanvas only for the game. Hence I flip between the two.
Is there another way (without drawing the softkeys in the area)
Im not sure I understand the question but i think the answer is that when you are using hte fullCanvas you can catch the keyPresses on the buttons that are usually softkeys. Their values are defined as constants in FullCanvas. Then you can make your menu however you want.