android contacts unformatted and formatted number -
samsung galaxy s6 edge, android 6.0.1, microsoft exchange active sync.
in app enumerate phone numbers person. people mobile phone number listed twice, 1 (manual) formatting use when enter number in outlook , 1 formatting removed.
entered , displayed correctly: 010-123 45 67 people app gets: 0101234567. displayed if send sms person , android seems remember number , save invisibly in address book.
if person in both outlook contacts , on phone contacts, formatted number visible.
any clue how remove unformatted numbers?
solved although i'm sure there better way.
phonenumber = phonecursor.getstring(phonecursor.getcolumnindex(number)); string stripped = stripseparators(phonenumber); int count = thenumbers.size(); boolean present = false; (int = 0; < count; i++) { if (stripseparators(thenumbers.get(i)).equals(stripped) == true) { present = true; break; } } if (present == false) thenumbers.add(phonenumber);
Comments
Post a Comment