How to read contacts in Android using Realm?

前端 未结 2 650
广开言路
广开言路 2020-11-27 23:54

I can\'t find any solutions to read contacts from Android and save them in Realm. Anyone done that before?

I know that I will have to use Contacts Provider

2条回答
  •  再見小時候
    2020-11-28 00:30

    You can create a Model Class to store desired data from contact

    then using Cursor get data and set data in model class.

    Save the cursor data in list of model object.

    Then insert all model object in single transaction as per object transaction has overhead and slow our app

提交回复
热议问题