katit
katit

Reputation: 17905

Screen blinks when I run my app

I just upgraded my Nexus S to 4.0.3 (different story)

Anyway, my app started to blink on a screen. I unchecked all those developer options but still. It doesn't do it always. But sometime when I turn screen it starts blinking (between black and normal).

Or it can blink when I just run app - on my Login activity. There is no errors in a log..

EDIT

There is no noticeable pattern for blinking. If I kill my app and start - it looks ok. I can use it for a while - OK. When I flip 90 degree blinking may start. Or when I close app and reopen - it may start.

I can kind of operate and switch activities but it is still blinking and doesn't stop even if I leave it alone. Going Home and starting app doesn't help. I can go and kill it and it will be fine at start...

Before I upgraded - I never had such issues and nobody (users) reported it..

EDIT 2

Played with my app little more and I see following pattern in a log (cycles): I tried to comment onResume completely and get cycle between bindData and onCreate

12-28 19:34:47.828: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:47.976: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:48.043: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:48.066: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:48.191: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:48.343: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:48.367: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:48.504: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:48.574: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:48.597: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:48.738: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:48.804: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:48.832: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:49.070: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:49.187: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:49.246: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:49.398: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:49.476: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:49.500: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:49.625: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:49.687: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:49.711: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:49.867: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:50.031: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:50.058: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:50.179: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:50.242: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:50.265: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:50.406: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:50.468: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:50.492: DEBUG/IDATT.HomeActivity(23854): onResume
12-28 19:34:50.621: DEBUG/IDATT.HomeActivity(23854): onCreate
12-28 19:34:50.769: DEBUG/IDATT.HomeActivity(23854): bindData
12-28 19:34:50.797: DEBUG/IDATT.HomeActivity(23854): onResume

Upvotes: 6

Views: 7427

Answers (3)

Rafique Mohammed
Rafique Mohammed

Reputation: 3796

My answer may help others! Most probably the blink is bcz of redirection between activities.

For example:

In MainActivity you are checking if user is logged in if not then u are redirecting to LoginActivity. In LoginActivity, (May be conditional mismatch or some bad code) its redirecting to your MainActivity back.

hence the redirection back and forth which causes your App blink.

Upvotes: 1

Christian Neverdal
Christian Neverdal

Reputation: 5375

I know this is very general, but it might be worth trying anyway:

  • Try another phone, with the same firmware. See if it still occurs. After all, it's possible it's a hardware issue.

  • See if it happens if you wait a while between switching from and to the application. In other words, press the back arrow, wait ten seconds, see if it ever happens.

  • Try writing a trivial app that can reproduce the problem. Or take your existing code and just remove almost all of it.

  • Also, what are you doing in your application? Narrow it down.

  • Specifically, what are you trying to do when the user hits the back button? Are you trying to kill it completely, or are you just suspending it?

Upvotes: 3

TryTryAgain
TryTryAgain

Reputation: 7820

Are you sure you have disabled all Developer options?

Try Settings --> Developer Options --> Show screen updates

That option is "Flash areas of screen when they update"

That should fix your issue.

If you have done that, like you said. I would enable that option --> reboot --> disable that option --> reboot ... and then see if the problem persists.

Taken from: http://androidforums.com/samsung-galaxy-nexus/468501-galaxy-nexus-psychedelic-screen-flicker.html in which the user says Even after disabling that option, flickering still persists

Try what I said above, with a couple reboots! Good Luck!

Upvotes: 0

Related Questions