I am new in android development and now my launcher activity show only 5 seconds and after that I want to check the user is logged in or not function and perform the actions
Assign millisDelayTime variable with the milliseconds you desire to cause a delay. mActivity is an object of Activity for providing Application Context. In your case millisDelayTime should be initialized with 5000
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//your code here
}
}, millisDelayTime);
}
});