GLBasic forum

Main forum => GLBasic - en => Topic started by: Ozden79 on 2010-Sep-01

Title: iOS4 multitasking, is it working now?
Post by: Ozden79 on 2010-Sep-01
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
Title: Re: iOS4 multitasking, is it working now?
Post by: mykyl66 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
Title: Re: iOS4 multitasking, is it working now?
Post by: trucidare on 2010-Sep-01
Gernot is in holidays 2 weeks.
Title: Re: iOS4 multitasking, is it working now?
Post by: Kitty Hello 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)
Title: Re: iOS4 multitasking, is it working now?
Post by: Ozden79 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.
Title: Re: iOS4 multitasking, is it working now?
Post by: mykyl66 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
Title: Re: iOS4 multitasking, is it working now?
Post by: Kitty Hello 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.
Title: Re: iOS4 multitasking, is it working now?
Post by: ampos on 2010-Oct-12
3G does not have multitask due to low memory and low processor, so it is disabled.
Title: Re: iOS4 multitasking, is it working now?
Post by: BdR 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?
Title: Re: iOS4 multitasking, is it working now?
Post by: ampos 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
Title: Re: iOS4 multitasking, is it working now?
Post by: MrTAToad on 2010-Nov-01
Hopefully Gernot will find a way to get it working on Mac & Linux...
Title: Re: iOS4 multitasking, is it working now?
Post by: BdR 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.
Title: Re: iOS4 multitasking, is it working now?
Post by: ampos 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.
Title: Re: iOS4 multitasking, is it working now?
Post by: Kitty Hello 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.