Use a contentresolver and use the GTalkDataMessageCapable table: that
should work

On 4 apr, 18:11, Jorge <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to add an users into xmppDataMessageCapable table, without
> success.
> This is my code:
>
> *****************************************************
> SQLiteDatabase db;
> ContentValues values = new ContentValues();
> String myResource = "Resource" ;
> String myEmail = "[EMAIL PROTECTED]";
> Cursor c;
> db = SQLiteDatabase.open("/data/data/com.google.android.providers.im/
> databases/im.db", null);
> c = db.query("xmppDataMessageCapable", new String[] { "bare_jid"},
> null, null, null, null, null);
> // .............
> // some code to test if user exist
> // ...............
> values.put("bare_jid", myEmail);
> values.put("resource", myResource );
> long jj=db.insert("xmppDataMessageCapable", null, values);
> db = null;
> *****************************************************
>
> The db.query() runs without any problems, I got my JID.
> But when I try to add a new users through db.insert(), I got nothing
> new into xmppDataMessageCapable table.
> If I put Log Long.toString(jj), I always get -1. Without errors or
> warning messages.
> I have tried with db.execSQL() too. I got the same result.
> What am I doing wrong?
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to