title: How to use Cursor's in non Activity Classes
body: <p>I wan't to get data's from <code>CallLog.Calls.CONTENT_URI</code> in non Activity classes. Am using cursor to get these data's from CallLog. But in non activity class cursor shows some error so how i can how i can do this?</p>
  
  <p>Presently am doing like this,</p>
  
  <pre><code>public class CallReceiver extends Activity {
  @Override
  public void onCreate(Bundle bundle) {
      super.onCreate(bundle);     
      Cursor cursor =  managedQuery(android.provider.CallLog.Calls.CONTENT_URI,null,null,null,null);
   startManagingCursor(cursor);
  </code></pre>