@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splach);
splash();
}
public void splash() {
Thread Splash_Timer = new Thread() {
public void run(){
try{
int Splash_Timer = 0;
while(Splash_Timer < 10000){
sleep(100);
Splash_Timer = Splash_Timer +100;
}
startActivity(new Intent("Main"));
}
catch (InterruptedException e) {
e.printStackTrace();
}
finally{
finish();
}
}
};
Splash_Timer.start();
}
This is my Splash Screen. It's working. I need to know how to check mobile and wifi internet connection on splash screen. The dialog box contain Exit and Continue button. Exit for Close App and Continue for ignore can't connect to internet on mobile.