Skip to content

Conversation

@Higashi8
Copy link

@Higashi8 Higashi8 commented Jan 19, 2026

Added social media info retrieval and a raw value extractor to access both implemented and unforeseen raw contact data.
Any feedback would be greatly appreciated.

Changes introduced

getAll: Added information from social networks (WhatsApp, Telegram, Facebook).
getContactDataValues(recordID, mimetype, columnsName): Extracts raw data by columns.

How is this implemented?

A SocialMediaItem object was added, which processes data from social networks and adds a new array (socialMedia) to the contact.
The getContactDataValues function performs a query by recordID, mimetype, and columnsName, and returns an array of raw values.

How to verify?

A “Raw data” button was added next to the “Delete” button to clearly demonstrate how the getContactDataValues function works. There you can also see examples of some social media data.

*

There is no implementation for iOS. The getContactDataValues function on iOS returns an empty array.

@Higashi8 Higashi8 mentioned this pull request Jan 19, 2026
@morenoh149
Copy link
Owner

is this related to

imAddresses: [
{ username: '0123456789', service: 'ICQ'},
{ username: 'johndoe123', service: 'Facebook'}
],

@Higashi8
Copy link
Author

Higashi8 commented Jan 29, 2026

@morenoh149
What do you mean by "related"? If I got you right, you mean a duplicated feature?

If yes, then this is not very related, because current version of the library returns only deprecated fields from contacts database. More about deprecation here: https://developer.android.com/reference/kotlin/android/provider/ContactsContract.CommonDataKinds.Im

I am adding app-specific data extraction by MIME type. for example, there is a contact with Skype and Telegram data:

Screenshot test

before:

{
    ...
    "imAddresses": [
      {
        "service": "Skype",
        "username": "live:F8419E50AC72"
      }
    ],
    ...
}

after:

{
    ...
    "socialMedia": [
      {
        "phone": "+12135550123",
        "rawPhone": "Message +1 213 555-0123",
        "accountType": "com.whatsapp",
        "accountName": "WhatsApp",
        "socialId": "[email protected]",
        "mimeType": "vnd.android.cursor.item/vnd.com.whatsapp.profile"
      }
    ],
    "imAddresses": [
      {
        "service": "Skype",
        "username": "live:F8419E50AC72"
      }
    ],
    ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants