iOS4 multitasking, is it working now?

Previous topic - Next topic

Ozden79

Hello There,

Can somebody confirm that iOS4 multitasking is now working with GLBasic V8 using AUTOPAUSE feature? Sorry for bothering as I don't have any capable device, I can't test it on my own.

Thanks in advance...

Özden

mykyl66

It does appear to be working but other issues seem to have cropped up but we have heard nothing from Gernot yet.

Waiting.

Mike

trucidare

Gernot is in holidays 2 weeks.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

The current update seems to work for me. Only hting is, when you get a low mem message, the app quits. I'll change that in the next update so it oly quits if there's less than 2MB free. (calling GLB_ON_QUIT, though)

Ozden79

Thanks for all the answers...

The low memory problem is something that I can live with but supporting multitasking (fast app switch) is essential so I'll still prefer upgrading in the current state.

mykyl66

Kitty,

Is that not how its supposed to work? iOS quits any app fully if the memory usage is getting too much for the machine. I think it checks for whatever is using the most memory first.

Mike

Kitty Hello

iOS 4.0 gave you low memory warnings on a 3G instantly when you started. Maybe 4.1 fixed that. I decided _not_ to do anything then.

ampos

#7
3G does not have multitask due to low memory and low processor, so it is disabled.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

BdR

*small kick*

Question: how can I test if my program is multitasking-proof on my ipod? I've written a cool game in GLBasic and it seems to run fine on my ipod (ios 4.1). But before I sumbit it to itunes I want to know that it won't crash when it runs on an iphone and then switches to incoming call or something.

In my GLBasic program I haven't set AUTOPAUSE to TRUE or FALSE, so I'm guessing it's then set to FALSE by default? What happens then when the user presses the HOME button on the iPod? The help file isn't very clear on this.

When I explicitly set AUTOPAUSE FALSE the program seems to just quit when I press home, and it calls GLB_ON_QUIT which is good. If I set AUTOPAUSE TRUE is seem to do the same thing..? Or are there multiple instances of my program running when I start and then quit? How can I see all running programs?

ampos

#9
I have this on my program:

Code (glbasic) Select

?IFDEF IPHONE
ALLOWESCAPE FALSE //not sure if this is necesary on the iPhone, but here it is
?ELSE
ALLOWESCAPE TRUE //I want ESC working on the PC
?ENDIF

mainloop:
repeat
IF pausao=1
REPEAT
HIBERNATE
UNTIL pausao=0
DRAWRECT 192,142,130,30,rrgb
ALPHAMODE -1;PRINT "P A U S E D",200,150
SHOWSCREEN
REPEAT;UNTIL MOUSEAXIS(3)=1
REPEAT;UNTIL MOUSEAXIS(3)=0
ENDIF

   rest_of_my_things

until "always"

SUB GLB_ON_PAUSE:
   pausao=1
ENDSUB

SUB GLB_ON_RESUME:
   pausao=0
ENDSUB



It works on the iPhone AND in the PC if I press outside the app window
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

Hopefully Gernot will find a way to get it working on Mac & Linux...

BdR

Okay I've found something :) if you don't want your iphone program to run in the background you can add UIApplicationExitsOnSuspend to your projects .plist file.

To do this, in the xcode project file double click the .plist file, then click on the key value of the last item. Now click on the plus button (+) to add an item, and choose "Application does not run in background" from the key-dropdownlist and check the checkbox.

I personally don't see the use of multi-tasking, at least not for games. I guess it might be usefull for some utilities, like a gps tracking program or something like that.

ampos

Well, in most of my games, I can resume in the exact point I left, without waiting for loading it again. On iPhone4 at least, it is a very nice feature.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Kitty Hello

with allowescape true (default) the home button calls GLB_ON_QUIT and done. With allowescape false, you can enable multitasking on iOS.