Hi, i want application to send an sms to one of my contacts.the problem consists is getting the phone number,not the name. using this code public void onActivityResult(int reqCode, int resultCode, Intent data) { super.onActivityResult(reqCode, resultCode, data); switch (reqCode) { case (PICK_CONTACT) : if (resultCode == Activity.RESULT_OK) { Uri contactData = data.getData(); Cursor c = managedQuery(contactData, null, null, null, null); if (c.moveToFirst()) { String number = c.getString(c.getColumnIndexOrThrow(People.NUMBER)); String name= c.getString(c.getColumnIndexOrThrow(People.NAME)); txtPhoneNo.setText(number+""+name); } } it returns "null" for number with the correct name,so i've tried to get the number as "int" and use a cast later but get strange thing: always number "6" instead of the phone number and always with the correct name. how can i fix it? Thank you for help
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en