Author Topic: iOS4 multitasking, is it working now?  (Read 6570 times)

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
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

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
Re: iOS4 multitasking, is it working now?
« Reply #1 on: 2010-Sep-01 »
It does appear to be working but other issues seem to have cropped up but we have heard nothing from Gernot yet.

Waiting.

Mike

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iOS4 multitasking, is it working now?
« Reply #2 on: 2010-Sep-01 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iOS4 multitasking, is it working now?
« Reply #3 on: 2010-Sep-02 »
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)

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: iOS4 multitasking, is it working now?
« Reply #4 on: 2010-Sep-02 »
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.

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
Re: iOS4 multitasking, is it working now?
« Reply #5 on: 2010-Sep-02 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iOS4 multitasking, is it working now?
« Reply #6 on: 2010-Oct-12 »
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.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: iOS4 multitasking, is it working now?
« Reply #7 on: 2010-Oct-12 »
3G does not have multitask due to low memory and low processor, so it is disabled.
« Last Edit: 2010-Oct-13 by ampos »
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

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: iOS4 multitasking, is it working now?
« Reply #8 on: 2010-Nov-01 »
*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?

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: iOS4 multitasking, is it working now?
« Reply #9 on: 2010-Nov-01 »
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
« Last Edit: 2010-Nov-01 by ampos »
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

  • Guest
Re: iOS4 multitasking, is it working now?
« Reply #10 on: 2010-Nov-01 »
Hopefully Gernot will find a way to get it working on Mac & Linux...

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: iOS4 multitasking, is it working now?
« Reply #11 on: 2010-Nov-01 »
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.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: iOS4 multitasking, is it working now?
« Reply #12 on: 2010-Nov-02 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iOS4 multitasking, is it working now?
« Reply #13 on: 2010-Nov-08 »
with allowescape true (default) the home button calls GLB_ON_QUIT and done. With allowescape false, you can enable multitasking on iOS.