I've three activity.
- SplashActivity
- RegisterNewRecordActivity
- StatisticsActivity
I can reach Register and Statistics from Splash. Given I go to to Register, and I send data to the server, I finish() RegisterNewRecordActivity and I go to Splash.
It is possible to automatically open StatisticsActivity, after the finishing of RegisterNewRecordActivity? At the moment this is my code: after sending data to the server I show a dialog and I finish this activity.
private void showSavedMealDialog() {
AlertDialog.Builder alert = new AlertDialog.Builder(getContext());
alert.setTitle("Data sent");
alert.setIcon(R.drawable.ic_launcher);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
alert.show();
}
But this bring me to SplashActivity, and I dont like this behavior.