How I do :

In application providing content :

<application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".ContentActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
                <provider android:name="ItemsProvider"
android:authorities="com.me.provider.Items" />
    </application>

You should have a Class called by the name of your provider :
ItemsProvider, that extends ContentProvider of course

In application that reads this content :

Activity Class :
Uri uriItems = Uri.parse("content://com.me.provider.Items/items");
Cursor curAll = managedQuery(uriLivres, null, null, null, "title
desc");

This URI depends of course on what you implemented in your
ItemsProvider, withe the method getType, using the UriMatcher.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to