Skip to main content
Inspiring
April 12, 2012
Question

App going in to sleep mode ??

  • April 12, 2012
  • 2 replies
  • 7166 views

So I've notice... when I fire up my app .. everything is butter. Everything runs smoothly.   If I don't touch the screen for a few minutes.. then touch the screen.  Everything is sluggish for 2 seconds and then back to normal.

Is this some sort of process thats putting my app to sleep or something ?

How can I get around this ?

Its not a good experience when you stop touching the app for a minute or so and then it is sluggish when you resume touching.

This topic has been closed for replies.

2 replies

May 30, 2012

Hi Applauz, I'm getting the exact same problem. Did you ever find a solution?

Applauz78Author
Inspiring
May 30, 2012

Well ..   I've been trouble shooting this for like a month.

I am using this small profiler script. ...  and when this profiler is running ..  my app runs perfectly.   I set the depth to 0 so its hidden and its all good.  It's not ideal .. but its working! ..

I even ran an additional profiler ( Monster Debugger ) to monitor my framerate, cpu usage, etc... and running this small profiler isn't putting any weight on my app so I'm just leaving it in for now in hopes that AIR 3.3 final build or 3.4 fixes this issue.

I can send you the files I am using if you want to try it out.

May 30, 2012

I've noticed it only happens when compiling in GPU mode, so possibly it's something to do with the way data is sent and stored to the graphics memory but really, who knows. Without GPU mode the playback isn't as smooth  and the overall feel is less polished so I want to try and stick with it. Would appreciate seeing how you implemented the profiler, sounds like the best sort of solution available right now...

Applauz78Author
Inspiring
April 13, 2012

Does anyone know if this is an iOS level issue ?  or AIR ?   Its so frustrating that the users experience is tainted when they don't touch the app for 2 minutes.

Applauz78Author
Inspiring
April 13, 2012

I just accidentally found a fix.

I was running a SWFProfiler to test my MEM usage... and noticed tha while the profiler is running ...  My app stays alive and perfect the entire time the profiler is running.

My framerate never drops below 60fps  ...

So now my question is ...    What could I put in my app that is lightweight that can keep my app active ?  Whats this profiler doing that is keeping everything running smooth and preventing the app from sleeping. ?

Applauz78Author
Inspiring
April 16, 2012

Ok .. this is driving me absolutely crazy! ..  

I've tried using a simple EnterFrame script to replace this Profiler .. thinking maybe that would stop this behaviour from happening.  No dice.

What is it about the profiler that is making my app run amazingly fast at all times ?

The one thing I hate about AIR is how it handles memory... and the tools for monitoring it.

Can anyone see any issues if I just leave this profiler in my app ( hidden ) and running ?   Not an ideal thing to do ...   but its keeping my app running without sluggish behaviour.