I have receiver and when some action is happening I need to reopen current activity(I am in HideSettingsActivity and I want to close that Activity and open the new one HideSettingsActivity). For this I'm just finishing current activity and open the new one via intent. Code below.
Intent reopenCurrentActivityIntent = new Intent(this, HideSettingsActivity.class);
reopenCurrentActivityIntent.putExtra(CURRENT_PASSWORD, passwordDialog.getPassword());
startActivity(reopenCurrentActivityIntent);
finish();
The problem is, that it's working only for first time,when receiver is gettings some action. Next times, opening new activity is not working. Other lines of code, which are before and after that piece of code, which I described above, they works fine. So the question is, why it is happening like that? And maybe there are some others way, to reopen current activity?