Restarting Android application after process is killed

前端 未结 3 1892
广开言路
广开言路 2021-02-04 07:26

When my application is idle, Android kills the process. If user reopens the application after some time, only the top Activity is created - this is a problem for me because the

3条回答
  •  隐瞒了意图╮
    2021-02-04 07:52

    I think this answer only for you.

    After finish progress call this

            finish();
            Intent intent = new Intent(this, sameactivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
    

提交回复
热议问题