[TIMOB-1894] Android: support read-write contacts
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-15T21:53:18.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API |
Components | Android |
Labels | api, look1, parity |
Reporter | Bill Dawson |
Assignee | Hieu Pham |
Created | 2011-04-15T03:04:55.000+0000 |
Updated | 2017-03-16T22:52:13.000+0000 |
Description
Currently the android implementation of our contacts api is read-only. We don't support modifications of contacts or creation of new contacts. We should.
assigning to Herr T for milestoning.
for me the priority should be upgraded to high, this situation leaves cross-platform apps crippled on one platform
Research for M04
This was put into M04 only for research purposes to try to scope the effort. After review, my assessment is that this is will be a fairly major effort.
ABRecordRef
(AB
being the prefix for address book stuff). So when properties are changed on Titanium'sTiContactsPerson
, the properties are then just changed on that object. Android doesn't do this provider stuff with objects, rather via queries in provider database system. So when changes are made to properties of aPersonProxy
in Titanium Android, we can't just turn around and update an in-memory object.Titanium.Contacts.save()
-- they just need to callABAddressBookSave
and all changes toABRecordRef
s up to that point are committed. In the case of Android, we'll have to work harder in the sense of somehow caching changes and applying them atsave()
time.PersonProxy
. If the Titanium JS code then modifies properties on thatPersonProxy
andTitanium.Contacts.save()
is called, which of the aggregated contact entries should be updated? We have to think about that carefully. (Note: If I use my Android 2.2 phone and go to People, pick a contact which I know is an aggregate and click the menu and choose "Edit", I'm prompted with a list of the underlying (non-aggregate) entries and asked to select which one I want to edit. So you can see this is an issue.)Titanium.Contacts.save()
would be to cache them in an array list containing AndroidContentProviderOperation
instances and then useContentResolver.applyBatch
whenTitanium.Contacts.save()
is called. None of that stuff is available in Android 1.6.Assigning for further milestoning.
This is a natural fit for the next release when we drop support for Api Level 4.
Customer's would like to see this implemented as soon as it's possible. Bumping priority to gain visibility.
Associated HD ticket
Another Customer relies on this, http://appc.me/c/APP-673928I think google offers a migration plan with code to code samples on how to move from the pre 2.0 release to the new contact model. http://developer.android.com/resources/articles/contacts.html
is there a fallback solution at the moment or is it not possible to save contacts at all for now?
Raised a separate ticket for modify contact functionality. TIMOB-9589
Closing ticket as fixed.