Starting to use e-mail
The application will have 2 activities: MainActivity and GreetingActivity.
- In MainActivity allow the user to enter their name, then create an intent to open GreetingActivity, forwarding the user-entered data to GreetingActivity. (1 pt)
- In GreetingActivity, collect additional information needed to send an e-mail from the user (recipient's e-mail address, ..)
- Once all necessary information is present, when the user presses a button in GreetingActivity, create an intent to send an e-mail with the previously collected data (2 pts)
- After sending the e-mail, redirect the user back to MainAcitvity and show a confirmation to the user that the e-mail has been sent. (2 pts)
- Remember your flow between MainActivity to GreetingActivity should be with StartActivityForResult() and onActivityResult().
- In the case of Gmail, you may receive Activity.RESULT_CANCELED as intent result. While this can be a bit confusing, you may ignore the fact that the result says "canceled". In any case, in your GreetingActivity, set the activity result to be RESULT_OK.