Repository navigation
feat: Android dialect - #20
Merged
Merged
Conversation
Reads and writes the X-ANDROID-CUSTOM rows of the Android contacts app: relations, wedding anniversaries and default nicknames. The Android type of a relation is kept in X-ANDROID-TYPE. Dates without a year are written to vCard 3.0 as Android does, as Apple's already were: the parsing of their JSPROP moves to the shared helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth step of the vendor layer: the
Androiddialect, for theX-ANDROID-CUSTOMrows of the Android contacts app. Each row is a line of the Android contacts database:vnd.android.cursor.item/relation;Jane;14;;…means Jane, relation type 14 (spouse).Reading
relation;Mother;8RELATED;VALUE=text;TYPE=parent;X-ANDROID-TYPE=8:MotherrelatedTorelation;Ann;0;Colleague(custom)RELATED;TYPE=colleague;X-ANDROID-TYPE=0;X-ANDROID-LABEL=Colleague:AnnrelatedTocontact_event;2015-03-04;1(anniversary)ANNIVERSARY:2015-03-04weddingnickname;Pseudo;1(default)NICKNAME:Pseudonicknamesagent.sibling.child.parent.friend.kin.spouse.X-ANDROID-TYPEandX-ANDROID-LABEL, invCardParams, so that a mother does not come back as a parent.Writing
BDAY:--04-12, or an event row with--06-12. The JSPROP parsing that Apple already used moves to the shared helpers.Several dialects
Reading can use every dialect at once. Writing should use those of the address book the vCard is for, because Apple and Android both write relations and dates, each in their own way. The README says so.
Tests
X-PHONETIC-*stays verbatim: JSContact requires aphoneticSystemorphoneticScriptfor phonetics, and Android gives neither.🤖 Generated with Claude Code