/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
IMMEDIATE (for next release)

* re-import all the test data, skipping dupes, so we can test caching
* re-import all the test data, having added a TEL to one of the contacts,
	merging dupes, so we can test merging with cached contacts
* things to check from test data
	- if there is a dupe that is merged contains a TEL, does that take
		preference over the existing contact's preferred TEL?
* "TEL;TYPE=WORK;TYPE=FAX:" is imported as "work", not "work fax"!
* after correcting the "TYPE=WORK;TYPE=FAX" issue, check that when two numbers
	appear, the first a fax, the second a normal number, but neither is
	preferred, the normal number takes precedence
* "EMAIL;TYPE=INTERNET;TYPE=WORK:" imports a "home" email address
* change some public final static ints, that aren't really consts, in to enums

FUTURE

* create a back-end object to read/write to android. This can be overridden to
	use the new ContractsContacts API.
* add warnings when email addresses, phone numbers, etc, fail sanitisation (and
	are ignored) during the import (see TODO comments in the code)
* add base64 decoding to support (even if to ignore) vcards with image data
* possible bug: when displaying "aborting import" toaster, make sure the back
	button is enabled and the abort button is hidden (as if abort were pressed)
	since this can happen if, say, the alarm goes off.
* add facility to be asked whether to import all contacts, not just those that
	are duplicates.
* add facility to import a duplicate contact as a new contact
	- is this possible? can you have two contacts with the same name in Android?
	- how would future duplicate merging be handled? you'd have to select which
		one you wanted to merge in to!
* in the long term, we probably need to save/restore state from doit/importer
	and stop preventing screen rotation on some activities