Introduction
Android is one of the most popular operating systems for mobiles. In this article, I will show you how to create an Email Android application using Android Studio.
Requirements
Steps to be followed
Follow these steps to create a native Email Android application using Android Studio. I have attached the source code too with this article.
Step 1
Open Android Studio and start a new Android Studio project.
Step 2
Choose your application name and choose where your project is stored at the location. If you wish to use C++ for coding the project, mark the "Include C++ support" checkbox, and click "Next" button.
Now, select the version of Android and select the target Android devices.
Step 3
Now, add an Empty Activity and click "Next" button.
Add the Activity name and click "Finish".
Step 4
Go to activity_contact_form.xml. This XML file contains the designing code for an Android app.
The XML code is given below.
Step 5
Go to App ⇒ Res ⇒values⇒String.xml.
The string XML code
- <resources>
- <string name="contact_form">Contact Us</string>
- <string name="contact_form_name">Your Name</string>
- <string name="contact_form_email">Your Email</string>
- <string name="contact_form_subject">Subject</string>
- <string name="contact_form_message">Message</string>
- <string name="contact_form_button">Send Message</string>
- <string name="contact_form_post_message">Please wait! We\'re sending your message to the support department...</string>
- <string name="contact_posted">Your message has been successfully delivered.</string>
- <string name="app_name">contact form</string>
- </resources>
Step 6
Go to MainActivity.java. This Java program is that of Android. Add the following code.
Step 6
Now, either go to menu bar and click "Make project" or press ctrl+f9 to debug the error.
Step 7
Then, click "Run" button or press shift+f10 to run the project. Select the "Virtual Machine" option and click OK.
Conclusion
We have successfully created Email app for Android using Android Studio.