Commit 1f7cb7b3 authored by Lucas NAURY's avatar Lucas NAURY

Remplacement de l'Intent SMS

parent e1bc847a
......@@ -58,11 +58,9 @@ public class DetailScreen extends AppCompatActivity {
binding.smsButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setData(Uri.parse("sms:"));
smsIntent.setType("vnd.android-dir/mms-sms");
smsIntent.putExtra(Intent.EXTRA_TEXT, "");
smsIntent.putExtra("address", annonce.getNumeroTelephone());
Uri uri = Uri.parse("smsto:" + annonce.getNumeroTelephone());
Intent smsIntent = new Intent(Intent.ACTION_SENDTO, uri);
smsIntent.putExtra("sms_body", "Bonjour,\nJe suis intéressé par votre annonce \""+ annonce.getTitre()+"\", n'hésitez pas à me recontacter. \n\n Merci");
startActivity(smsIntent);
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment