AlexDL @ 27.07.2010, 11:34
Hello!
Do not import contacts from your SD root, though the program states that
Pin imported, but in the contact list and it is not displayed, it may
someone - anyone encountered such a problem?
Yes encountered) it is possible that you have a VCF file in UTF-8, but it is necessary for it to be in UTF-8 without BOM (
http://ru.wikipedia.org/wiki/Byte_order_mark)I here by the way is how decided to transfer contacts problem after flashing. before it has copied a database file with contacts, pulled from the database are two tables - people and phones. further put them in with: as CSV files
and then a little python:
#Program which convert people and phones tables from contacts.db android file to vcf
import csv
people = csv.reader (open ( "people", "rb"), delimiter = ",")
phones = csv.reader (open ( "phones", "rb"), delimiter = ",")
writer = csv.writer (open ( "people_phones", "wb"), delimiter = ",")
vcf = open ( "contacts.vcf", "wb")
dict_p = {}
for row in people:
id = row [0]
name = row [9]
dict_p [id] = name
for row_ph in phones:
id = row_ph [1]
phone = row_ph [3]
if dict_p.has_key (id):
name = dict_p.get (id)
writer.writerow ([id, name, phone])
vcf.write ( "BEGIN: VCARD \ n")
vcf.write ( "VERSION: 2.1 \ n")
vcf.write ( "N; CHARSET = UTF-8:;" + name + ";;; \ n")
vcf.write ( "FN; CHARSET = UTF-8:" + name + "\ n")
vcf.write ( "TEL; CELL:" + phone + "\ n")
vcf.write ( "END: VCARD \ n")
vcf.close ()