IllegalArgument exception Unknown Url
<p>I have a problem with my application such that I want to delete a message in the inbox through the following Uri: content://sms/inbox. But when i run the app, I get an IllegalArgument exception saying that the Url is unknown. Here is the code:</p>

<pre><code>package com.messageHider;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class viewsms extends Activity implements OnClickListener {
    Button buttonHide;
    TextView textViewSender,textViewDateSent;
    EditText editTextBody;
    SharedPreferences prefs;
    String sms_id;
    Cursor cursor;
    Uri smsUri=Uri.parse("content://sms/inbox");
    Handler handler=new Handler();
    ProgressDialog progressdialog;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.viewsms);
        buttonHide=(Button)findViewById(R.id.buttonHide);
        textViewSender=(TextView)findViewById(R.id.textViewSender);
        textViewDateSent=(TextView)findViewById(R.id.textViewDateSent);
        editTextBody=(EditText)findViewById(R.id.editTextBody);
        buttonHide.setOnClickListener(this);

    }
    @Override
    protected void onStart() {
        super.onStart();
        prefs=getSharedPreferences(sms.PREFERENCE_FILE,0);
        sms_id=prefs.getString("smsid","No such id");
        cursor=getMessage(sms_id);
        cursor.moveToFirst();
        textViewSender.setText(cursor.getString(3));
        textViewDateSent.setText(cursor.getString(4));
        editTextBody.setText(cursor.getString(11));

    }
    @Override
    public void onClick(View v) {
        switch(v.getId())
        {
        case R.id.buttonHide:
            progressdialog=ProgressDialog.show(viewsms.this, "", "Hiding, please wait...");
            handler.postDelayed(new Runnable(){
                @Override
                public void run() {
                    prefs=getSharedPreferences(sms.PREFERENCE_FILE,0);
                    sms_id=prefs.getString("smsid","No such id");
                    int count=getContentResolver().delete(viewsms.this.smsUri, "_id=?",new String[]{sms_id});
                    if(count&gt;0)
                    {
                    progressdialog.dismiss();
                    Toast.makeText(viewsms.this,"Message hidden",Toast.LENGTH_LONG).show();
                    }
                }

            },3000);

            //dbConnection conn=new dbConnection(getApplicationContext());
            //SQLiteDatabase db=conn.getWritableDatabase();

            /*SQLiteDatabase db=conn.getReadableDatabase();
            cursor=db.query(dbConnection.TABLE,null,null,null,null,null,null);
            cursor.moveToFirst();
            Toast.makeText(getApplicationContext(),cursor.getString(cursor.getColumnIndexOrThrow(dbConnection.SENDER)),Toast.LENGTH_LONG).show();*/
            break;
        }
    }
    private Cursor getMessage(String message_id)
    {
        Cursor cursor=getContentResolver().query(smsUri,null,"_id=?",new String[]{message_id},null);
        return cursor;
    }

}
</code></pre>

<p>Here is my manifest with the permissions, unless I am missing one:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.messageHider"
      android:versionCode="1"
      android:versionName="1.0"&gt;

    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".messageHider"
                  android:label="@string/app_name"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".sms"/&gt;
        &lt;activity android:name=".viewsms"/&gt;
    &lt;/application&gt;
    &lt;uses-permission android:name="android.permission.READ_SMS"/&gt;
    &lt;uses-permission android:name="android.permission.WRITE_SMS"/&gt;
    &lt;uses-permission android:name="android.permission.RECEIVE_SMS"/&gt;
&lt;/manifest&gt;
</code></pre>

<p>I will appreciate the help.</p>
