


Step 3 − Add the following code to src/MainActivity. Step 2 − Add the following code to res/layout/activity_main.xml. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 Add the following code to res/layout/activitymain.xml. Step 1 Create a new project in Android Studio, go to File New Project and fill all required details to create a new project. Toast public class MainActivity extends Activity įollowing will be the content of res/layout/activity_main.This example demonstrates how to send HTML email using Android App using Kotlin. This example demonstrates how to send an email with a file attachment in Android using Kotlin. Intents could be Implicit, for instance, calling intended actions, and explicit as well, such as opening another. Run the application to launch Android emulator and verify the result of the changes done in the application.įollowing is the content of the modified main activity file src//MainActivity.java. Intent intentEmail new Intent (Intent.ACTIONSENDTO) 2 - If you want it to be opened by only the mail then use the setData () method: tData (Uri.parse ('mailto:')) Otherwise it will ask you to open it as text, image, audio file by other apps present on your device. Intents, in general, are used for navigating among various activities within the same application, but note, is not limited to one single application, i.e., they can be utilized from moving from one application to another as well. Modify AndroidManifest.xml as shown below Modify res/values/strings.xml to define required constant values I'm adding a simple button to launch Email Client. Modify layout XML file res/layout/activity_main.xml add any GUI component if required. You can check Android Official Documentation for a complete list of Actions. Modify src/MainActivity.java file and add required code to take care of sending email. Following table lists down various important Android Intent Standard Actions. While creating this project, make sure you Target SDK and Compile With at the latest version of Android SDK to use higher levels of APIs. You will use Android studio to create an Android application and name it as Tutorialspoint under a package.

Second you will need to have an Email client like GMail(By default every android version having Gmail client App) or K9mail installed on your device. To Email experiment with this example, you will need actual Mobile device equipped with latest Android OS(Android lollipop), otherwise you might get struggle with emulator which may not work properly.

Data Mining - Rule Based Classification In MainActivity Intent object is created and its action is defined to ACTIONSEND to send an email, with Intent three extra fields are also added using the putExtra function.Data Mining - Classification and Prediction.
