Scenario :
I open my app by clicking icon, do something, navigate through activities, pause the app by clicking home button.
Case 1:
If I
Try to replace you splash Activity code with this code..
public class Splash extends Activity {
protected boolean _active = true;
protected int _splashTime = 2000;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.splash);
Thread splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while (_active && (waited < _splashTime)) {
sleep(100);
if (_active) {
waited += 100;
}
}
} catch (InterruptedException e) {
e.toString();
} finally {
Intent intent = new Intent(getApplicationContext(),
MainActivity.class);
startActivity(intent);
finish();
}
}
};
splashTread.start();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
// super.onBackPressed();
}
}