title: content://sms/sent/ not working
body: <p>This is the SMS observer code. I need to check only sent sms. When I use the <code>content://sms/</code> I get the result. But why don't I get results when I use the <code>content://sms/sent/</code>? I'm using Android 2.1.</p>
  
  <pre><code>import android.app.Service;
  import android.content.ContentResolver;
  import android.content.Intent;
  import android.database.ContentObserver;
  import android.database.Cursor;
  import android.net.Uri;
  import android.os.Handler;
  import android.os.IBinder;
  import android.util.Log;
  
  public class smsSentService extends Service 
  {
      ContentResolver contentResolver;
      Uri uri=Uri.parse("content://sms/sent");
      Handler handler;
  
      @Override
      public IBinder onBind(Intent arg0) 
      {
          return null;
      }
  
      @Override
      public void onCreate() 
      {
          contentResolver=getContentResolver();
          contentResolver.registerContentObserver(uri, true, new contentObserver(handler));
          super.onCreate();
      }
  
      @Override
      public void onStart(Intent intent, int startId) 
      {
          super.onStart(intent, startId);
      }
  
      @Override
      public void onDestroy() 
      {
          super.onDestroy();
      }
  
      public class contentObserver extends ContentObserver
      {
          public contentObserver(Handler handler) 
          {
              super(handler);
          }
  
          @Override
          public void onChange(boolean selfChange) 
          {                   
              Cursor cursor = contentResolver.query(uri, null, null, null, null);
              cursor.moveToFirst();
              String content = cursor.getString(cursor.getColumnIndex("body"));
              Log.d("!!!!!!!!!!!!!", content);
              super.onChange(selfChange);
          }
      }
  }
  </code></pre>