Looks good but....
I am attempting to implement this rather intriguing little idea but I have a few points/questions:
Do I have to implement a permission in the manifest to initiate the email? I guess so as I am getting an error saying no activity found to handle the intent; and
If anyone is implementing this into an existing application you many want to add the following to the end of your main.java file-
public void onBackPressed() {
Intent leaveIntent = new Intent(main.this, leaveapp.class);
startActivity(leaveIntent);
finish();
}
where leaveintent.java is the equivalent of William's "Main.java" code above.