I need a little help with refreshing one of my activities in my application. I\'m using tab host activity and connecting to web service and downloading some data from one of my
on button press:
Intent intent = new Intent(this, SyncActivity.class);
//intent.putExtra("someData", "Here is some data");
startActivityForResult(intent, 1);
Then in the same Activity class:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode==RESULT_OK){
Intent refresh = new Intent(this, InitialActivity.class);
startActivity(refresh);
this.finish();
}
}
The Sync Activity would have:
setResult(RESULT_OK, null);
finish();