Max
Max

Reputation: 572

maximum number of contact_id

I am working with the contacts API from android, where I insert and delete contacts. Each time a contact is deleted that contact_id will never be used again. So my problem lies with updating my contacts. As some information changed and new ones are added it is impossible for me to update the contacts correctly, so instead I delete them all and then insert the information again. This means however that if I had 20 contacts, those 20 contacts_id can never be used again and the contact_id number will grow very fast.

My question now is there a problem with such a approach? Has android a maximum number of contact_id to hand out?

Upvotes: 0

Views: 1027

Answers (2)

Manitoba
Manitoba

Reputation: 8702

If Android has one, it must be huge. Don't bother about that.

Upvotes: 0

Alexey A.
Alexey A.

Reputation: 1419

I personally consider there is no problem in such approach. Most likely sqlite db storage is used for phone contacts with id of type INT which will give you max id = 9223372036854775807. Which is least likely to be reached in practice.

And even if the number is reached then ids of deleted contacts will be randomly assigned.

Upvotes: 2

Related Questions