I received errorr when trying to send a message
<pre><code>send.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            //URI uri=uri.parse("sms://+919500518057");
            sendSms("9500518057","message");
            //startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("sms:"+ "+919500518057")));

        }

        private void sendSms(String phno, String message) {
            // TODO Auto-generated method stub
            Log.v("PhoneNumber",phno);
            Log.v("MEssage", message);
            PendingIntent pi=PendingIntent.getActivity(this, 0, new Intent(this, Object.class), 0);
            SmsManager sms=SmsManager.getDefault();
            sms.sendTextMessage(phno, null, message, pi, null);
        }
    });
</code></pre>

<p>In manifest file</p>

<pre><code>   &lt;uses-permission android:name="android.permission.SEND_SMS"/&gt;
</code></pre>

<p>I received error as following: The method getActivity(Context, int, Intent, int) in the type PendingIntent is not applicable for the arguments (new View.OnClickListener(){}, int, Intent, int)
in the manifest file i put the following code </p>
