Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving default number for contact

I have read How to detect the default phone number of a contact (if set), but it seems that IS_SUPER_PRIMARY only works on some phones, is there a better solution to get the default number for a contact?

like image 377
Ryan S Avatar asked Dec 20 '25 06:12

Ryan S


1 Answers

I believe this simply is one of those device dependent things. I'd use IS_SUPER_PRIMARY and when it returns nothing I'd just pick one from the list of numbers or let the user pick which to use. Alternatively you should look into which number from a list the user has used most often and use this as the primary.

like image 56
Warpzit Avatar answered Dec 22 '25 18:12

Warpzit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!