Intent opens gmail with subjects but with no text. Where is mistake? Please help. I spent for this 2 hours). Subject fields are plain, but no text. I added method with returning String.
public void submitOrder(View view) {
String message = total();
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + "ded-logoped@ukr.net"));
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.java_order_for) + " " + pseudoname());
intent.putExtra(Intent.EXTRA_TEXT, message);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(Intent.createChooser(intent, getString(R.string.сhoose_email_app)));}
}
public String total(){
CheckBox checkBoxmilk = findViewById(R.id.mychb);
CheckBox checkBoxchoco = findViewById(R.id.jrfen);
if (checkBoxchoco.isChecked()){
chocolad = chocolad+2;
}
else {
chocolad = chocolad-chocolad;
}
if (checkBoxmilk.isChecked()){
milk = milk+1;
}
else {
milk = milk-milk;}
int all = quantity*price+milk+chocolad;
String together = pseudoname()+" заказал "+quantity+" cups "+"\n" +"add milk? "+check()+"\n"+"add chocolate? "+check2()+"\n"+"Total "+(NumberFormat.getCurrencyInstance().format(all));
return together;