Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Suspend / Resume  (Read 1873 times)
0 Members and 1 Guest are viewing this topic.
Offline j2metoo

Senior Newbie




Java games rock!


« Posted 2004-06-10 21:17:52 »

Anyone knows how to test suspend / resume using the Nokia 7210 and other emulators?

Thanks..
Offline davidaprice

Junior Devvie





« Reply #1 - Posted 2004-06-11 05:57:22 »

If you mean pausing a MIDlet, as in pauseApp and resumeRequest, you need to know that Nokia's phones never use them. I.e. pauseApp will never get called, and (presumably) resumeRequest  does nothing.

In Series 40 phones (e.g. 7210), MIDlets are paused and resumed simply by suspending and resuming the whole MIDP JVM, so all that will happen is that the system clock will appear to jump forward when the MIDlet is resumed. Typically the MIDlet/JVM will have been suspended because something else is using the screen, so at least MIDlets using Canvas can detect this by overriding showNotify.

In Series 60 phones (e.g. 6600), MIDlets aren't paused even if some other application takes over the screen - Symbian OS is a multi-tasking OS, so the MIDlet gets to keep running. MIDlets using Canvas or GameCanvas can detect this by overriding hideNotify and showNotify, and all MIDlets can detect this by periodically calling method isShown on their current displayable.
Offline caraiz

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-06-11 06:06:35 »

hi! at 7210 emulator u can test it pressing any number key (of keyborard) during the game. A screen call will appear and then delete de number and it will back to the game.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline j2metoo

Senior Newbie




Java games rock!


« Reply #3 - Posted 2004-06-12 01:49:57 »

That's some cool information... Cheesy

Thanks...
Grin
Quote
If you mean pausing a MIDlet, as in pauseApp and resumeRequest, you need to know that Nokia's phones never use them. I.e. pauseApp will never get called, and (presumably) resumeRequest  does nothing.

In Series 40 phones (e.g. 7210), MIDlets are paused and resumed simply by suspending and resuming the whole MIDP JVM, so all that will happen is that the system clock will appear to jump forward when the MIDlet is resumed. Typically the MIDlet/JVM will have been suspended because something else is using the screen, so at least MIDlets using Canvas can detect this by overriding showNotify.

In Series 60 phones (e.g. 6600), MIDlets aren't paused even if some other application takes over the screen - Symbian OS is a multi-tasking OS, so the MIDlet gets to keep running. MIDlets using Canvas or GameCanvas can detect this by overriding hideNotify and showNotify, and all MIDlets can detect this by periodically calling method isShown on their current displayable.

Offline j2metoo

Senior Newbie




Java games rock!


« Reply #4 - Posted 2004-06-12 01:52:44 »

It did not work...The keys 2/4/5/6/8 are mapped to arrow keys too...

Could you clarify?  

I am running 7210 and I hit all kinds of keys without success...

Thanks...

Quote
hi! at 7210 emulator u can test it pressing any number key (of keyborard) during the game. A screen call will appear and then delete de number and it will back to the game.

Offline j2metoo

Senior Newbie




Java games rock!


« Reply #5 - Posted 2004-06-12 01:55:32 »

Btw, I noticed that on a real series40, while playing my game, if there is an incoming call, there is an alert to show information about the call, then the game resumed  like nothing happened and one can still continue to talk and play at the same time... Huh

Kind of strange...

Is there a way to detect that there was an incoming call?  Ie. I need to cleanup some resources like closing down the HTTP connections, timers and such...


Thanks...

Quote
If you mean pausing a MIDlet, as in pauseApp and resumeRequest, you need to know that Nokia's phones never use them. I.e. pauseApp will never get called, and (presumably) resumeRequest  does nothing.

In Series 40 phones (e.g. 7210), MIDlets are paused and resumed simply by suspending and resuming the whole MIDP JVM, so all that will happen is that the system clock will appear to jump forward when the MIDlet is resumed. Typically the MIDlet/JVM will have been suspended because something else is using the screen, so at least MIDlets using Canvas can detect this by overriding showNotify.

In Series 60 phones (e.g. 6600), MIDlets aren't paused even if some other application takes over the screen - Symbian OS is a multi-tasking OS, so the MIDlet gets to keep running. MIDlets using Canvas or GameCanvas can detect this by overriding hideNotify and showNotify, and all MIDlets can detect this by periodically calling method isShown on their current displayable.

Offline shmoove

Junior Devvie




Doh!


« Reply #6 - Posted 2004-06-13 07:34:18 »

When the "Incoming call" alert shows up the hideNotify() method of the current canvas is displayed. That's how you catch it.

shmoove
Offline j2metoo

Senior Newbie




Java games rock!


« Reply #7 - Posted 2004-06-13 14:32:07 »

Sorry for bugging you again, but after the initinal alert/hideNotify(), the phone resumes the game...while the call is still going on...

In other words, my feeling is that there is no reliable way to pause the app upon a call and resume if and only if the call has ended using system events ONLY.

My strategy has been to pause the app and resume based on user action explicitly...

Does that sound right?  Huh

Thanks,
Quote
When the "Incoming call" alert shows up the hideNotify() method of the current canvas is displayed. That's how you catch it.

shmoove

Offline shmoove

Junior Devvie




Doh!


« Reply #8 - Posted 2004-06-13 16:21:03 »

Exactly. hideNotify() puts the game in "Paused, press some key to continue"-type mode. You don't unpause it yourself, but let the user take care of that when he's done with the call. If you check out almost any of the popular games, you'll see that's what they all do.

shmoove
Offline caraiz

Senior Newbie




Java games rock!


« Reply #9 - Posted 2004-06-14 14:03:54 »

Quote
It did not work...The keys 2/4/5/6/8 are mapped to arrow keys too...

Could you clarify?  

I am running 7210 and I hit all kinds of keys without success...

Thanks...



If u press directly in the emulator with the mouse or a number of the numeric keyboard it will no work, only work pressing a number of the alphanumeric keyboard.
At least it work in Nokia 7210 MIDP SDK v1.0

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline j2metoo

Senior Newbie




Java games rock!


« Reply #10 - Posted 2004-06-15 13:44:20 »

The key "W" and some of the numbers at the top of the keyboard work!!!

Grin

Thanks...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!