Llene el correo electrónico con el formulario enteries Eclipse Android

Soy novato a la codificación de esta es mi primera aplicación y me gustaría rellenar el cuerpo de un correo electrónico con las entradas de mi formulario. He estado intentando todo el día para conseguir que funcione simplemente no lo han descubierto, cualquier ayuda será muy apreciada. Las entradas de registro en consola reflejan la entrada de formulario pero el correo electrónico no se rellena. Gracias por adelantado,

Aquí está el código que tengo hasta ahora.

<?xml version="1.0" encoding="UTF-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/appDiscription" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/discription_text" android:textAppearance="?android:attr/textAppearanceLarge" /> <Spinner android:id="@+id/employeeSpinner" android:layout_width="match_parent" android:layout_height="44dp" android:entries="@array/employeeSpinner" android:prompt="@string/employeeSpinner" /> <Spinner android:id="@+id/jobTypeSpinner" android:layout_width="match_parent" android:layout_height="44dp" android:entries="@array/jobTypeSpinner" android:prompt="@string/jobTypeSpinner" /> <EditText android:id="@+id/jobDateText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/job_date_text" android:inputType="date" > <requestFocus /> </EditText> <EditText android:id="@+id/clientText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/client_text" android:inputType="textPersonName" /> <EditText android:id="@+id/arrivalText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/arrival_text" android:inputType="time" /> <EditText android:id="@+id/departureText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/departure_text" android:inputType="time" /> <EditText android:id="@+id/assignmentText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/assignment_text" android:inputType="textPersonName"/> <EditText android:id="@+id/notesText" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/notes_text" android:inputType="textMultiLine" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:onClick="onClick" android:text="@string/submit_button" /> </LinearLayout> 

 import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Spinner; public class AssignmentTracker extends Activity { Spinner employeeSpinner; Spinner jobTypeSpinner; EditText clientText; EditText jobDateText; EditText arrivalText; EditText departureText; EditText assignmentText; EditText notesText; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); employeeSpinner = (Spinner) findViewById(R.id.employeeSpinner); jobTypeSpinner = (Spinner) findViewById(R.id.jobTypeSpinner); clientText = (EditText) findViewById(R.id.clientText); jobDateText = (EditText) findViewById(R.id.jobDateText); arrivalText = (EditText) findViewById(R.id.arrivalText); departureText = (EditText) findViewById(R.id.departureText); assignmentText = (EditText) findViewById(R.id.assignmentText); notesText = (EditText) findViewById(R.id.notesText); } public void onClick(View v) { String employeeType = employeeSpinner.getSelectedItem().toString(); String jobType = jobTypeSpinner.getSelectedItem().toString(); String nameText = clientText.getText().toString(); String dateText = jobDateText.getText().toString(); String arrivalType = arrivalText.getText().toString(); String departureType = departureText.getText().toString(); String assignText = assignmentText.getText().toString(); String noteText = notesText.getText().toString(); Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Daily Worksheet"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Employee:" + employeeSpinner.getSelectedItem().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Job Type:" + jobTypeSpinner.getSelectedItem().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Date:" + jobDateText.getText().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Client:" + clientText.getText().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Arrival Time:" + arrivalText.getText().toString()); emailIntent.putExtra(android.content.Intent. EXTRA_TEXT, "Departure Time:" + departureText.getText().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Assignment:" + assignmentText.getText().toString()); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Notes:" + notesText.getText().toString()); emailIntent.setType("plain/text"); startActivity(emailIntent); Log.d("AssignmentTracker", "onClicked " + employeeType); Log.d("AssignmentTracker", "onClicked " + jobType); Log.d("AssignmentTracker", "onClicked " + nameText); Log.d("AssignmentTracker", "onClicked " + dateText); Log.d("AssignmentTracker", "onClicked " + arrivalType); Log.d("AssignmentTracker", "onClicked " + departureType); Log.d("AssignmentTracker", "onClicked " + assignText); Log.d("AssignmentTracker", "onClicked " + noteText); 

Sólo puede establecer campos como dirección de correo electrónico, asunto y cuerpo.

Usted puede componer el texto del cuerpo de los campos que usted tiene y enviarlo como abajo.

 try { final Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setType("plain/text"); if (recipient != null) intent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to}); if (subject != null) intent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject); if (message != null) intent.putExtra(android.content.Intent.EXTRA_TEXT, message); startActivity(Intent.createChooser(intent, "Send mail...")); } catch (ActivityNotFoundException e) { } 
  • Cómo averiguar qué clase anónima interior se indica por un nombre de clase?
  • Prácticas recomendadas para la implementación de Android onClickListener
  • No es accesible en el contexto actual
  • ¿Cambia el Ancho y la Altura con orientación?
  • No se puede agregar un nuevo objeto a RealmList debido a la referencia de objeto null
  • Field.getGenericType () devuelve la instancia de java.lang.Class en lugar de Type
  • XML vs setImageDrawable / setImageBitmap
  • Obtenga nivel y estado de la batería en Android
  • Variable 'runnable' debe ser inicializado
  • Jmdns registra en la interfaz IPv4, pero transmite IPv6
  • Coloque un rectángulo alrededor de una cadena en un lienzo de Android
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.