I am attmepting to write a file to the application's internal cache.
Attach the created file to an email(with an intent) and finally delete the temporary file.
Unfortunately unless I step through the code using debugging the email fires up before the file exists and simlarly, if I step through, allowing a pause before the email intent, the email shows the attachment but after sending the attachment it does not exit on the email, presumably becasue as soon as I click Send the file is being deleted by the next line.
Any ideas how how can run these 3 lines with each completing before moving to the next?
Thanks in advance.
Attach the created file to an email(with an intent) and finally delete the temporary file.
Unfortunately unless I step through the code using debugging the email fires up before the file exists and simlarly, if I step through, allowing a pause before the email intent, the email shows the attachment but after sending the attachment it does not exit on the email, presumably becasue as soon as I click Send the file is being deleted by the next line.
Any ideas how how can run these 3 lines with each completing before moving to the next?
Thanks in advance.