title: Black Screen Shows in Android ( Splash Screen )
body: <p><strong>What is Problem ?</strong></p>
  
  <p>My app is social forum app. When i try to login app. After splash screen it shows black screen. How Can I Resolve this ?</p>
  
  <p><strong>What you have tried ?</strong></p>
  
  <ol>
  <li><p>when i try it on emulator. it sometimes work but if i try to logout and login. black screen comes.</p></li>
  <li><p>i changed sleep time(8000-9000-10000). it sometimes work but when i try to login with username and password black screen comes. </p></li>
  <li><p>there is no error in debug mode and i checked ftp logs too.</p></li>
  <li><p>i tried alternative solutions on internet but it didn't work.</p></li>
  </ol>
  
  <p><strong>Here is my splash activity</strong></p>
  
  <pre><code>package com.abulletin.forumapp.Activity;
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import com.abulletin.forumapp.R;
  
  public class SplashActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_splash);
  
          getActionBar().hide();
  
          Thread timerThread = new Thread(){
              public void run(){
                  try{
                      sleep(2000);
                  }catch(InterruptedException e){
                      e.printStackTrace();
                  }finally{
                      Intent i = new Intent(getApplicationContext(),MainActivity.class);
                      startActivity(i);
                  }
              }
          };
          timerThread.start();
      }
  
      @Override
      protected void onPause() {
          // TODO Auto-generated method stub
          super.onPause();
          finish();
      }
  }
  </code></pre>
  
  <p><strong>Here is my manifest xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.abulletin.forumapp" &gt;
  
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.GET_TASKS" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_SETTINGS" /&gt;
      &lt;uses-permission android:name="com.mymonas.ngobrol.permission.C2D_MESSAGE" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /&gt;
      &lt;uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:name="com.abulletin.forumapp.MyApplication"
          android:logo="@android:color/transparent"
          android:theme="@style/Theme.Blue" &gt;
          &lt;receiver
              android:name="com.abulletin.forumapp.util.GcmBroadcastReceiver"
              android:permission="com.google.android.c2dm.permission.SEND" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
                  &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
  
                  &lt;category android:name="com.mymonas.ngobrol.services" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  
          &lt;service android:name="com.abulletin.forumapp.util.GCMNotificationReceiver" /&gt;
  
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.MainActivity"
              android:label="@string/app_name" &gt;
          &lt;/activity&gt;
  
          &lt;meta-data
              android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
  
          &lt;activity
              android:name="com.google.android.gms.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /&gt;
  
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.LoginActivity"
              android:label="@string/title_activity_login" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.RegisterActivity"
              android:label="@string/title_activity_register" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.PostActivity"
              android:label="@string/title_activity_post" &gt;
          &lt;/activity&gt;
          &lt;activity android:name="com.abulletin.forumapp.Activity.ProfileActivity" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.SettingsActivity"
              android:label="@string/title_activity_settings" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.AboutActivity"
              android:label="@string/title_activity_about" &gt;
          &lt;/activity&gt;
          &lt;activity android:name="com.abulletin.forumapp.Activity.CategoryThreadActivity" &gt;
          &lt;/activity&gt;
          &lt;activity android:name="com.abulletin.forumapp.Activity.AddEditThreadActivity" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.EditProfileActivity"
              android:label="@string/profile_menu_edit" &gt;
          &lt;/activity&gt;
  
         &lt;!-- &lt;meta-data
              android:name="com.crashlytics.ApiKey"
              android:value="0ab64bea47ca3f35dffbd2c94200fbc26be26009" /&gt; --&gt;
  
          &lt;activity
              android:name="com.abulletin.forumapp.Activity.SplashActivity"
              android:configChanges="orientation|keyboardHidden|screenSize"
              android:label="aBulletin Android Forum"
              android:theme="@style/FullscreenTheme" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity android:name="com.facebook.LoginActivity"
              android:configChanges="orientation"
              android:screenOrientation="landscape"
              android:label="@string/app_name"
              android:theme="@style/AppTheme"
              /&gt;
          &lt;meta-data android:name="com.facebook.sdk.ApplicationId"
              android:value="@string/facebook_app_id"/&gt;
  
          &lt;service android:name="com.parse.PushService" /&gt;
  
          &lt;receiver android:name="com.parse.ParseBroadcastReceiver" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
                  &lt;action android:name="android.intent.action.USER_PRESENT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>