1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
public class SendSMSActivity extends Activity {
 
	Button buttonSend;
	Button buttonSend2;
 
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
 
		buttonSend = (Button) findViewById(R.id.buttonSend);
		buttonSend2 = (Button) findViewById(R.id.buttonSend2);
 
		buttonSend.setOnClickListener(new OnClickListener() {
		buttonSend2.setOnClickListener(new OnClickListener() {
 
			@Override
			public void onClick(View v) {
 
switch (v.getId()) {
				
				case R.id.buttonSend:
				     Intent sendIntent = new Intent(Intent.ACTION_VIEW);
				     sendIntent.putExtra("sms_body", "abc"); 
				     sendIntent.putExtra("address", "9909990");
				     sendIntent.setType("vnd.android-dir/mms-sms");
				     startActivity(sendIntent);
				     break;
				
				case R.id.buttonSend2:
					Intent sendIntent1 = new Intent(Intent.ACTION_VIEW);
				     sendIntent1.putExtra("sms_body", "def"); 
				     sendIntent1.putExtra("address", "012345678");
				     sendIntent1.setType("vnd.android-dir/mms-sms");
				     startActivity(sendIntent1);
				     break;
				}
				     						
			}
			});
		});
	}
		
}