4

Occasionally I'll start an app only to be presented with the App's title bar and a black screen. Usually the app's interface shows after 3-10 seconds. Very rarely the screen will stay black. I don't have any real idea about why or how to reproduce it.

I'm wondering if this is simply the phone working to try to start the app or maybe I've got too many other applications open?

Is there some way to reduce/prevent apps from showing a black screen at first and/or not opening at all?

4

Black is the default plot color for Android, so this is the placeholder until the app completes it's layout operation. There are a number of things that can cause an app to have a delay here:

  • Performing a network call(s).
  • Loading data from disk.
  • Garbage collection from other tasks.
  • Restoring a complex drawing.

You can check to see if it is related to network latency by putting your phone in airplane mode and opening the app. If the app pops right up, the long delay is likely due to a network call that takes a while to complete (and completes immediately as an error when there is no connection).

The other three are trickier to test for. If it is garbage collection, you will likely only see the delay when other apps have been recently running and then switching immediately the misbehaving app. You can completely uninstall an app, including user data, and then re-install to see if it has something to do with your personal settings.

1

The black screen is probably related to 'lag'. This lag can be caused by a number of things.

On the Samsung Galaxy S its a 'known' problem that the memory used for main storage is pretty slow. Especially when another app is writing a lot of data (mostly big downloads and marketplace updates)

When I'm updating applications or creating a lot of data traffic I generally just don't use my device for anything while those apps are busy, this should help you too prevent the 'black screen of lag' on your device.

  • I'm not sure whether the memory is slow or the file systems used or maybe one of the file caches. But it's slow so applications take a while to load. – Barfieldmv Sep 27 '10 at 9:21
0

I've seen this before, it seems to be when the application is loading or switching back into the foreground while the OS is busy doing something else. Seems more likely to occur when in the middle of a sync or while happening to receive a text message or some other notification causing event.

  • yes, all those things can cause it. Is it just lag, or is there something that can be done about it? – cofiem Sep 20 '10 at 22:33
0

Use below style on your launcher activity.

 <style name="Theme.AppCompat.Light.NoActionBar.FullScreen"
parent="@android:style/Theme.Black.NoTitleBar">
 <item name="windowNoTitle">true</item>
 <item name="windowActionBar">false</item>
 <item name="android:windowFullscreen">true</item>
 <item name="android:windowContentOverlay">@null</item>
 <item name="android:windowIsTranslucent">true</item></style>

for complete code check this tutorial

  • Since Android.SE's rule prohibits discussion about writing Android apps, OP is likely talking about the behaviour of an app he didn't write and has no control on source code level. – Andy Yan Sep 17 '16 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.