i want to run the last line code after the activity is close, the activity is share activity like this.
When click other application (ex: Gmail), the last line code run first before open the apps. Say "Couldn't attach file".
Code :
// Set Intent and Start Activity, the user from global
Intent shareIntent = MailController.setEmailAndIntent(uris,user);
startActivity(Intent.createChooser(shareIntent, Constants.share_intent_title));
// when activity close then run code below, but before the activity closed this code is run.
PersonController.deleteEnrollFile(getBaseContext());