/android/export-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/export-contacts

« back to all changes in this revision

Viewing changes to src/org/waxworlds/edam/exportcontacts/ContactsContactReader.java

  • Committer: edam
  • Date: 2011-06-11 08:22:04 UTC
  • Revision ID: edam@waxworlds.org-20110611082204-u2v1ri3a8iayq9b4
- added ContactReader interface
- added ContactsContactReader class to read old-style android.Contacts data
- updated FileChooser from import contacts app
- updated TODO
- added Doit activity
- added Exporter
- added VcardExporter that writes vCards

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * ContactsContactReader.java
3
3
 *
4
 
 * Copyright (C) 2011 Tim Marston <edam@waxworlds.org>
 
4
 * Copyright (C) 2010 Tim Marston <edam@waxworlds.org>
5
5
 *
6
6
 * This file is part of the Export Contacts program (hereafter referred
7
7
 * to as "this program"). For more information, see
92
92
                                        Contacts.Organizations.COMPANY ) ),
93
93
                                cur.getString( cur.getColumnIndex(
94
94
                                        Contacts.Organizations.TITLE ) ) ) );
95
 
                cur.close();
96
95
 
97
96
                // get the phone numbers
98
97
                cur = _activity.managedQuery( Contacts.Phones.CONTENT_URI,
109
108
                                        Contacts.Phones.TYPE ) ),
110
109
                                cur.getString( cur.getColumnIndex(
111
110
                                        Contacts.Phones.NUMBER ) ) ) );
112
 
                cur.close();
113
111
 
114
112
                // get the email and postal addresses
115
113
                cur = _activity.managedQuery( Contacts.ContactMethods.CONTENT_URI,
143
141
                                        cur.getString( cur.getColumnIndex(
144
142
                                                Contacts.ContactMethods.DATA ) ) ) );
145
143
                }
146
 
                cur.close();
147
144
 
148
145
                return true;
149
146
        }