[英]How to know which contacts from phone use our app
I am working on a chat app with kotlin language and I am trying to load all the contacts which are presently on the users phone.我正在使用 kotlin 语言开发一个聊天应用程序,并且我正在尝试加载当前在用户手机上的所有联系人。
I am saving their phone numbers in my database but I also want the users to know that which contacts are using this app and which are not using.我将他们的电话号码保存在我的数据库中,但我也希望用户知道哪些联系人正在使用这个应用程序,哪些没有使用。
I have been watching tutorials to do this but am not able to find it.我一直在看教程来做到这一点,但我找不到它。 Please if anybody can help.请如果有人可以提供帮助。 It would be great.那会很好。
I don't think there is anyway apart from searching through your database.除了搜索您的数据库之外,我认为没有其他方法。 For contact in your users phone check if the number is in your database.对于您的用户电话中的联系人,请检查该号码是否在您的数据库中。 You could sort the numbers in your database so that you can use binary search and make it faster.您可以对数据库中的数字进行排序,以便您可以使用二进制搜索并使其更快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.