Android Open Source - personal-android-chat Splash






From Project

Back to project page personal-android-chat.

License

The source code is released under:

GNU General Public License

If you think the Android project personal-android-chat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.yeho.androidchat;
/*from  w  w  w  .ja v a 2  s.c  o  m*/


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.os.Handler;
import android.widget.ImageView;


public class Splash extends Activity {

  
  int elementos = 0;
  int cont = 0;
  private ImageView mMain;
  
  public static final int DIALOG_DOWNLOAD_PROGRESS = 0;

   
   private int id;
   SQLiteDatabase db = null;
   String uri2;
   
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    setContentView(R.layout.splash);
    

        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            public void run() {

              if (isInternet()) {
              }
                lanzar(uri2);

            }
        }, 3000);
  }
  
  
  
   public void lanzar(String uri2) {
          Intent i = new Intent(this, LoginActivity.class);
          i.putExtra("splash", uri2);
          startActivity(i);
      }
    
  
  public boolean isInternet() {

    boolean enabled = true;

    ConnectivityManager connectivityManager = (ConnectivityManager) this
        .getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo info = connectivityManager.getActiveNetworkInfo();

    if ((info == null || !info.isConnected() || !info.isAvailable())) {
      enabled = false;
    }
    return enabled;
  }
  
  
  

}




Java Source Code List

com.yeho.androidchat.Activity_Home.java
com.yeho.androidchat.LoginActivity.java
com.yeho.androidchat.Splash.java
com.yeho.androidchat.database.SQLiteHelper.java
com.yeho.androidchat.utility.ClientWS.java
com.yeho.androidchat.utility.FileCache.java
com.yeho.androidchat.utility.ImageLoader.java
com.yeho.androidchat.utility.JSONParser.java
com.yeho.androidchat.utility.MemoryCache.java