Calling/messaging between the emulator instances works fine for me, that's not what was happening to me.
Solved the problem by changing the locale & text input. It seems when entering a phonenumber to a contact in the default way ie. "5556" the number changes to "555-6". I'm assuming this is due to the US area codes. But if I add a contact through the messaging app, it also works fine and the number is stored as "5556" I was under the impression that using Uri contactUri = Uri.withAppendedPath(Contacts.Phones.CONTENT_FILTER_URL, Uri.encode (number)); would ignore this and use the same number as entered by the user. /Sime On 18 Nov, 20:59, joebowbeer <joe.bowb...@gmail.com> wrote: > Looking ahead: > > Emulator Instances can no longer call/sms each other in SDK 1.5 > http://code.google.com/p/android/issues/detail?id=2660 > > --Joe > > On Nov 17, 12:30 am,Sime<sime...@gmail.com> wrote: > > > > > I'm trying to lockup what contact belongs to a specific number. I'm > > sending sms from one emulator instance to another (ie. 5554 to 5556 > > for example) and have entered contacts with those numbers. But when > > running the code below my cursor doesn't return anything. The > > filtering seems like it's not working, or I'm doing something wrong? > > > private String getContactNumber(String number) { > > > String[] projection = new String[] { > > Contacts.Phones.DISPLAY_NAME, > > Contacts.Phones.NUMBER}; > > > Uri contactUri = Uri.withAppendedPath > > (Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(number)); > > Cursor c = getContentResolver().query(contactUri, projection, > > null, null, null); > > > if (c.moveToFirst()) { > > String name = c.getString(c.getColumnIndex > > (Contacts.Phones.DISPLAY_NAME)); > > Log.d("Name", name); > > return name; > > > }else{ > > Log.d("GetContact", "Not a contact"); > > } > > return number; > > > } > > > Any tips, hints would be much appreciated! Thank you in advance > > > Best Regards > >Sime -- 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