You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by chris_d_k <ck...@christiankiefer.de> on 2015/05/04 11:20:05 UTC

Flex mobile - Screen is flickering on animations after app was in background

On our mobile app we have the problem that there is a flickering in the
background when something is animated after the app was in the background...
When we change the view the problem is gone...

Is this a flex problem or an air problem?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Hi,

is there anyone knowing how to solve the problem?  Is this problem only on
Sony Xperias?

I found an easy way to reproduce the problem.

- Create a new mobile project witha ViewNavigatorApplication
- Create a view with a list and some content (f.e. Strings from 1 to 10)
- Start the app and send it to the background for some times or rotate the
device (portrait/landscape) a few times and scroll the list 

-> The screen starts flickering 

I am using Flex4.14.1 Air18. The problem existed also with previous versions
(f.e. Flex4.12.1 -> Air14)

The phone (Xperia Z Ultra, Model C6833, Qualcomm MSM8974) is using Android
5.0.2 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10752.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Have you tried different AIR versions?
Yes.

Also, how about different rendering modes? 
No. As I think auto==cpu is the only making sense with flex



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10272.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Héctor A <ne...@gmail.com>.
Have you tried different AIR versions? Also, how about different rendering
modes?

On Mon, May 4, 2015 at 1:26 PM, chris_d_k <ck...@christiankiefer.de> wrote:

> *IT HAPPENS ON My Xperia Z Ultra with Android 5.0.2 but NOT on my Galaxy S2
> with Android 4.2.2*
>
> On the sony device and Android 5.0.2 it's not only happening with
> animations... it seems to be happening also in interactions (click on
> button, ...) so parts of the screen are flickering in black and white... So
> when I press the button some componentes get completely black... when I
> release the button they are again displayed correctly...
>
> All of this only happens if the app was sent to the background before...
> and
> it happens on every view
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10248.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
*IT HAPPENS ON My Xperia Z Ultra with Android 5.0.2 but NOT on my Galaxy S2
with Android 4.2.2*

On the sony device and Android 5.0.2 it's not only happening with
animations... it seems to be happening also in interactions (click on
button, ...) so parts of the screen are flickering in black and white... So
when I press the button some componentes get completely black... when I
release the button they are again displayed correctly... 

All of this only happens if the app was sent to the background before... and
it happens on every view





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10248.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Héctor A <ne...@gmail.com>.
Which type of animation and which version of AIR are you using? I haven't
seen any problem in any of my apps using diferent AIR versions and using
either the built in tweening classes or TweenLite.

On Mon, May 4, 2015 at 11:20 AM, chris_d_k <ck...@christiankiefer.de> wrote:

> On our mobile app we have the problem that there is a flickering in the
> background when something is animated after the app was in the
> background...
> When we change the view the problem is gone...
>
> Is this a flex problem or an air problem?
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Close and restart app on android

Posted by Frank Dahmen <fr...@dahmenia.de>.
how do i start (invoke) an app from an app on android?
thanks


Am 19.08.2015 um 17:40 schrieb OmPrakash Muppirala:
> I belive it should work fine.   Rather you should invoke the app and then
> exit.  Have you tried that?
>
> Thanks,
> Om
> On Aug 19, 2015 12:32 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>
>> Hi,
>> is it possible to close an app (System.exit() or NativeApplication.exit())
>> and automatically restart it?........i don't think so?
>>
>> Thanks
>>
>>
>>


Re: Close and restart app on android

Posted by OmPrakash Muppirala <bi...@gmail.com>.
I belive it should work fine.   Rather you should invoke the app and then
exit.  Have you tried that?

Thanks,
Om
On Aug 19, 2015 12:32 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

> Hi,
> is it possible to close an app (System.exit() or NativeApplication.exit())
> and automatically restart it?........i don't think so?
>
> Thanks
>
>
>

Close and restart app on android

Posted by Frank Dahmen <fr...@dahmenia.de>.
Hi,
is it possible to close an app (System.exit() or NativeApplication.exit())
and automatically restart it?........i don't think so?

Thanks



Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Angelo Lazzari <an...@redtulp.com>.
Hi, i am experiencing the same problem on lg g3 android 5.0. The view is
flickering just scrolling a combo box in his options...

How we can solve the problem?

Is there a way to use the combo box without scrolling an use the one (old
on ???) where when the combo box has the focus opens a option windows that
appears fron the bottom part of the screen?

Than you very much!!
angelo

El jue., 6 de agosto de 2015 15:56, Alex Harui <ah...@adobe.com> escribió:

> OK, but do you get the same results on devices that don’t flicker?  Maybe
> some animation code is setting the frame rate.  I don’t know if I would
> notice an animation being 5 or 6 frames slower.
>
> -Alex
>
> On 8/6/15, 5:22 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:
>
> >Hi,
> >
> >my test result is that when returning back to active the enterFrame on the
> >ViewNavigatorApplication is called 24 to 25 times/seconds instead of the
> >setted 30 times.
> >
> >
> >
> >--
> >View this message in context:
> >
> http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flick
> >ering-on-animations-after-app-was-in-background-tp10246p10905.html
> >Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Alex Harui <ah...@adobe.com>.
OK, but do you get the same results on devices that don’t flicker?  Maybe
some animation code is setting the frame rate.  I don’t know if I would
notice an animation being 5 or 6 frames slower.

-Alex

On 8/6/15, 5:22 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Hi,
>
>my test result is that when returning back to active the enterFrame on the
>ViewNavigatorApplication is called 24 to 25 times/seconds instead of the
>setted 30 times.
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flick
>ering-on-animations-after-app-was-in-background-tp10246p10905.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Hi,

my test result is that when returning back to active the enterFrame on the
ViewNavigatorApplication is called 24 to 25 times/seconds instead of the
setted 30 times.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10905.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Alex Harui <ah...@adobe.com>.
Well, the idea behind changing frame rate when going into the background
is that you don’t need smooth animations you can’t see, and lower frame
rate saves battery.

Now if there is a bug on one device where, when you switch frame rates and
then set it back but it doesn’t actually restore to the new frame rate,
then that is either a bug in the device or AIR.  A simple, no-Flex test
might prove that if you have time to create one.  If you hook up an
enterFrame event, and use getTimer() to display how often you get
enterFrame you can show how actual frame rate compares to stage frame rate.

-Alex

On 8/5/15, 7:13 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Currently the issue doesn't exist anymore with buttons... only lists or
>anymations... 
>
>When I have sent the app to the background and reactivate it again and
>scroll a list everything is blinking but not the list which is scrolling -
>the same with animations... (Animation in fine, everything else is
>blinking)
>
>and once the activeView is changed everything is working fine again...
>
>*But the problem is really the frame rate!!!* - witout changing the
>framerate everything is working correctly ... but it is bad practice... or
>not?
>
>        private function onApplicationActivate(event:Event):void
>        {
>//            app.stage.frameRate = 30;
>                sendNotification(AppConstants.APP_ACTIVATED);
>        }
>
>        private function onApplicationDeactivate(event:Event):void
>        {
>//                app.stage.frameRate = 1;
>                sendNotification(AppConstants.APP_DEACTIVATED);
>        }
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flick
>ering-on-animations-after-app-was-in-background-tp10246p10898.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Currently the issue doesn't exist anymore with buttons... only lists or
anymations... 

When I have sent the app to the background and reactivate it again and
scroll a list everything is blinking but not the list which is scrolling -
the same with animations... (Animation in fine, everything else is blinking)

and once the activeView is changed everything is working fine again... 

*But the problem is really the frame rate!!!* - witout changing the
framerate everything is working correctly ... but it is bad practice... or
not?

        private function onApplicationActivate(event:Event):void
        {
//            app.stage.frameRate = 30;
                sendNotification(AppConstants.APP_ACTIVATED);
        }

        private function onApplicationDeactivate(event:Event):void
        {
//                app.stage.frameRate = 1;
                sendNotification(AppConstants.APP_DEACTIVATED);
        }



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10898.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Alex Harui <ah...@adobe.com>.

On 8/4/15, 1:13 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Hi Alex,
>
>I looped through every child of the navigators activeView and invalidated
>it
>and called validateNow() on them -> without any effect...
>
>I also found out the "Goal Manager"-App in the flex showcase has the same
>problem... at least... is it a bug with flex or adobe air?

Do you still have the issue where you click on a button and it turns black
for a while?  That might be easier to debug than scrolling a list or other
animations.  I would subclass the button and override its
updateDisplayList and track how often it gets called.  It could be on the
bad device the screen refresh rate never recovers from being slowed while
in the background.

-Alex


Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Hi Alex,

I looped through every child of the navigators activeView and invalidated it
and called validateNow() on them -> without any effect...

I also found out the "Goal Manager"-App in the flex showcase has the same
problem... at least... is it a bug with flex or adobe air?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10893.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by Alex Harui <ah...@adobe.com>.
ValidateNow() will update everything that need validation.  Trying to
invalidate everything is painful.  Maybe you can find the thing that isn’t
invalidated but should be?

-Alex

On 7/23/15, 2:41 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Is there a way to force an update of the complete screen and all of its
>components? Maybe this can fix the problem as leaving the view fixes the
>problem?
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flick
>ering-on-animations-after-app-was-in-background-tp10246p10842.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Flex mobile - Screen is flickering on animations after app was in background

Posted by chris_d_k <ck...@christiankiefer.de>.
Is there a way to force an update of the complete screen and all of its
components? Maybe this can fix the problem as leaving the view fixes the
problem?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-mobile-Screen-is-flickering-on-animations-after-app-was-in-background-tp10246p10842.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.