I have the main activity with TimerTask and process and create a menu with setup activity.I want when use back button from setup activity go to main activity from start.I want refresh main activity when back.Now when back my main activity stop,break and exit from apk when restart TimerTask.Some code from my apk for understand...
This is inside main activity menu
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.menu_exit:
finish();
return true;
case R.id.menu_setup:
startActivity(new Intent(this, Setup.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
after i have a TimerTask with start and stop from button...
My setup.class is SharedPreference for save delay time for timer...
I want code for back button in this class and go from start(refresh) main activity...with new delay time for TimerTask from preferences.