Contacts DataBase

by Alexandru Mos » Fri, 03 Oct 2008 01:37:47 GMT


Sponsored Links
 I have 2 questions. Do you know why I can't update the contact phone
numbers and how can I read an IM (Instant message) account in the new
version of sdk (v 1.0) ?

-- 
Ing. Alexandru Mos


--~--~---------~--~----~------------~-------~--~----~



Contacts DataBase

by dailyLife » Thu, 16 Oct 2008 10:31:39 GMT


 Query:
public Cursor queryAll(String[] returnSequence) {
  Cursor cusor = null;
  ContentResolver contentResolver = mContext.getContentResolver();
  cusor = contentResolver.query(Contacts.People.CONTENT_URI, returnSequence, 
null, null, null);// DEFAULT_SORT_ORDER
  return cusor;
 }
 public Cursor queryByName(String[] returnSequence, String name) {
  Cursor cusor = null;
  ContentResolver contentResolver = mContext.getContentResolver();
  cusor = contentResolver.query(Contacts.People.CONTENT_URI, returnSequence, 
Contacts.People.NAME + "=?", new String[] { name }, Contacts.People.NAME + " 
ASC");// DEFAULT_SORT_ORDER
  return cusor;
 }
update:
String[] projection = new String[] { Contacts.People._ID, Contacts.People.NAME, 
Contacts.People.NUMBER };
   cusor = contentResolver.query(Contacts.People.CONTENT_URI, projection, 
Contacts.People.NAME + "=?", new String[] { oldName }, Contacts.People.NAME + " 
ASC");
   cusor.moveToFirst();
   ContentValues values = new ContentValues();
   Uri uri = Uri.withAppendedPath(Contacts.People.CONTENT_URI, 
cusor.getString(cusor.getColumnIndex(Contacts.People._ID)));
   values.put(Contacts.People.NAME, newName);
   values.put(Contacts.People.STARRED, 0);
   contentResolver.update(uri, values, null, null);

[EMAIL PROTECTED]
200806
----- Original Message ----- 
From: Alexandru Mos 
To: android-developers 
Sent: 2008-10-02, 23:32:49
Subject: [android-developers] Contacts DataBase


I have 2 questions. Do you know why I can't update the contact phone
numbers and how can I read an IM (Instant message) account in the new
version of sdk (v 1.0) ?

-- 
Ing. Alexandru Mos



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. MPEG2 TS + HTTP Live Streaming Support on Android



Wrong!!!  MPEG Transport Streams are just a container.  All commercial
streaming servers support both H.264 and MPEG-2 encapsulated in
MPEG Transport Streams.

Nothing prevents you to stream H.264 within a TS to an Android player
(assuming there is one that supports them).  In fact, TS are more
lightweight than some other containers.  The fact that TS are defined
in the MPEG-2 Part 1 spec does not mean they relate to the
compression, they are just a container used in subsequent formats.

Now, does anyone knows what player supports TS on Android?

Bernard

PS: sorry if this is the wrong group for this post






--

2. Slow emulator

Hi guys,

Pretty new to the whole Android idea, I am buying the HTC hero soon
and would quite like to develop for it. I have found on my PC that the
emulator runs really slowly- to get to actually being able to use my
app when emulating takes around a minute and a half. Can anyone
suggest why? I use Eclipse, with Windows 7 and a good-but-not-amazing
spec laptop. Please help! Thanks

-- 

3. Quiet Here?

4. Is that compulsory to use Java developing android apps????

5. Installing Android Tools in Eclipse on Ubuntu

6. Gradient banding on high DPI devices

7. View Flipper Performance with MapView