Tuesday, September 10, 2013

[android help] I need to send SMS through my android app with content chooser option


I need to send SMS through my android app with content chooser option



I already tried below mentioned code.but it showing a dialog box "No application can perform this application".



private void sendSMS(String number)
{
Toast.makeText(this, "In Send sms", Toast.LENGTH_SHORT).show();
String message="Welcome to My App";
Intent sms_intent=new Intent(android.content.Intent.ACTION_SENDTO);
sms_intent.putExtra("sms_body",message);
sms_intent.putExtra("address",number);
sms_intent.setType("vnd.android-dir/mms-sms");
startActivity(Intent.createChooser(sms_intent,getResources().getText(R.string.sms)));
}


instead of ACTION_SENDTO,I tried ACTION_VIEW and ACTION_SEND. But I didnt get my desired result.



Read more

stackoverflow.comm



No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...