最初にユーザーにプロファイルフォームに記入して記入してもらい、次にメインアクティビティに誘導するようにロジックに依頼したいと思います。アプリを閉じてから再度開いた後、プロファイルアクティビティを最初に起動するのではなく、メインアクティビティを起動する必要があります。これどうやってするの?私は助けを必要としています。ありがとう。
これは私がこれまでに試したことです:
private void doThread(){
Thread timer = new Thread(){
public void run(){
try{
sleep(5000); // sleeps/delays for 3 seconds
} // end try
catch(InterruptedException e){
e.printStackTrace();
}finally{
// this is going to create new intent activity for
// based on the action name (com.fps.ihealthfirst.IHEALTHFIRSACTIVITY)
boolean firstTime = mPreferences.getBoolean("user_prefs", true);
if (firstTime) {
Intent myProfile = new Intent( Disclaimer.this, Profile_Pref.class );
startActivity(myProfile);
}
else{
Intent openIHealthFirst = new Intent( "com.fps.iHealthFirst.IHEALTHFIRSTACTIVITY" );
startActivity( openIHealthFirst );
finish();
}
}// end finally
} // end run method
}; // end thread
timer.start();
}