Content Provider not working
<p>I am using Xperia which runs on ICS. Here is an app that I wrote as a way to understand the working of Content Providers. The application runs fine on GingerBread emulator but does not shows a thing in my phone. Whats the prob which is causing app to behave like this ?
Here is code for android manifest.</p>

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

    &lt;uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="17" /&gt;
    &lt;uses-permission android:name="android.permission.READ_CONTACTS"/&gt;

    &lt;application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" &gt;
        &lt;activity
            android:name="legacy_systems.contentprovider.MainActivity"
            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;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>And the code for layout.</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" &gt;

    &lt;ListView 
        android:id="@+id/android:lst"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:stackFromBottom="false"
        android:transcriptMode="normal" /&gt;

    &lt;TextView
        android:id="@+id/con_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textStyle="bold" /&gt;

    &lt;TextView 
        android:id="@+id/con_id"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Finally, the code for java source file.</p>

<pre><code>package legacy_systems.contentprovider;

import android.os.Bundle;
import android.view.Menu;
import android.app.ListActivity;
import android.content.CursorLoader;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import android.widget.CursorAdapter;
import android.widget.SimpleCursorAdapter;

public class MainActivity extends ListActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        Uri allCont = Uri.parse("content://contacts/people");
        Cursor c;
        if(android.os.Build.VERSION.SDK_INT &lt;11){
            c = managedQuery(allCont, null, null, null, null);
        }
        else{
            CursorLoader cl = new CursorLoader(this,
                    allCont,
                    null,
                    null,
                    null,
                    null);

            c = cl.loadInBackground();
        }
        String[] columns = new String[]{ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts._ID};
        int views[]=new int[]{R.id.con_name, R.id.con_id};
        SimpleCursorAdapter ada;

        if(android.os.Build.VERSION.SDK_INT&lt;11){
            ada = new SimpleCursorAdapter(this, R.layout.activity_main,c, columns, views);
        }
            else
            {
                ada = new SimpleCursorAdapter(this, R.layout.activity_main,c, columns, views, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
            }
        this.setListAdapter(ada);

    }

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

}
</code></pre>

<p>I am unable to sort out the problem in it. 
Thanks in advance.</p>
