Saturday, February 16, 2013

Android sending SMS

package com.sdk.test;

import android.os.Bundle;
import android.telephony.SmsManager;
import android.view.Menu;

public class MainActivity extends Activity {

    protected void onCreate(Bundle savedInstanceState) {
        SmsManager sms = SmsManager.getDefault();
        sms.sendTextMessage("012704570X", null, "send from app", null, null);

    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;

1 comment: