Before Proceeding to deal with Sending Emails in Android. Let us see first,
What is Intent?
Intents are asynchronous messages which help us to activate the Components such as Activities, Services, Board cast Receivers.
The Core Components of the Application are invoked by Intents.
In other words Intent is a horde of Information which contains the Action, Data’s involved in the Action, and the Category of the Component.
Use Intents, as shown below, write the following code in the button click event, if you want to send a mail to a user, when the user hits Email Button.
// Creating a Object for the Class Intent
Intent sendIntent;
// Since we want to send ,we are using ACTION_SEND
sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("application/octet-stream");
sendIntent.putExtra(Intent.EXTRA_EMAIL,new String[] {"san123@gmail.com"});
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Test");
sendIntent.putExtra(Intent.EXTRA_TEXT, "Hy Testing");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getAbsolutePath()));
sendIntent.setType("image/jpeg");
startActivity(Intent.createChooser(sendIntent, "Send Mail"));
Subscribe to:
Posts (Atom)
Notification in Android Using AlarmManager, BoradCastReceiver & Services
Our aim is to show notification message to user in a specific time. Say For example , I have planned to show Notification ...
-
Our aim is to show notification message to user in a specific time. Say For example , I have planned to show Notification ...
-
Step1 : create anim folder under res directory in ur project. Step2 : create an slideleft.xml file Step3 : type the following code in t...
-
Hi , Let us See how to Create a Login Based Application in Android. My Aim is , i have to display SignUp Page,when the User access my appl...