Query on committing changes to content providers

by Kowsh » Tue, 12 Jan 2010 02:35:38 GMT


Sponsored Links
 Here is my manifest file for your reference :

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

    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".GolfScore"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="4" />

<uses-permission android:name="android.permission.READ_CONTACTS"></
uses-permission>
<uses-permission android:name="android.permission.WRITE_CONTACTS"></
uses-permission>
</manifest>

Thanks,
Kowshik



> Kowshik



Query on committing changes to content providers

by SREEHARI » Thu, 14 Jan 2010 01:30:47 GMT


 Hi,
I think ur code will work for SDK 1.0 only. For higher version it will
work by applying some small changes in your code.

Use

Contacts.People.createPersonInMyContactsGroup(getContentResolver(),
values);

Instead of

ContentResolver contRes= getContentResolver();
                 contRes.insert(People.CONTENT_URI, values);

Hope this will work.

Thanks,
SREEHARI








> Kowshik


Sponsored Links


Query on committing changes to content providers

by Kowshik Prakasam » Mon, 18 Jan 2010 15:53:11 GMT


 Thanks Sreehari.
Hi Sreehari,

Actually that piece of code doesnt work for SDK 1.0 as well.

I sorted out the issue. I had to simply follow the steps explained here :
 http://developer.android.com/guide/topics/providers/content-providers.html 
My bad. I didnt read the doc thoroughly before posting this query.

Thanks,
Kowshik

On Tue, Jan 12, 2010 at 11:05 AM, SREEHARI <sreehari.madhusooda...@wipro.com




>