Getting error while reading multiple numbers of contact
Getting error while reading multiple numbers of contact
BY 23 Jan 2018Native Application Development
I am making an app in which i want all details of contact.
But while reading multiple mobile numbers I am getting an errorcode -22(CONTACTS_ERROR_INVALID_PARAMETER) only for some contacts.
Here is my code,
contacts_db_get_record(_contacts_contact._uri,id, &record);
int child_phones_count = 0;
char *contact_number = NULL;
ret = contacts_record_get_child_record_count(record, _contacts_contact.number, &child_phones_count);
dlog_print(DLOG_ERROR,LOG_TAG,"Error getting child record count: %d",ret);
if (ret == CONTACTS_ERROR_NONE)
{
int i;
for (i = 0; i < child_phones_count; i++)
{
contacts_record_h child_record_phone = NULL;
char *contact_number = NULL;
if (contacts_record_get_child_record_at_p(record, _contacts_contact.number, i, &child_record_phone) == CONTACTS_ERROR_NONE
&& contacts_record_get_str(child_record_phone, _contacts_number.number, &contact_number) == CONTACTS_ERROR_NONE
&& contact_number != NULL)
{
dlog_print(DLOG_INFO,LOG_TAG,"Phone number : %s",contact_number);
}
else
{
}
free(contact_number);
}
}
Getting error while reading multiple numbers of contact
I am making an app in which i want all details of contact.
But while reading multiple mobile numbers I am getting an errorcode -22(CONTACTS_ERROR_INVALID_PARAMETER) only for some contacts.
Here is my code,
getting log like,
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio