PlatformContactsHelper
Util class to add and remove contacts in Android ContactsProvider using a contentResolver. Each contact added with it is tagged with the sourceName and the sourceType.
sourceName and the sourceType can be used to simulate different source of contact like for example different Bluetooth devices.
Requires permission android.permission.WRITE_CONTACTS
Requires permission android.permission.WRITE_CALL_LOG
Constructors
Types
Functions
Add a single contact with a name, contact details and a photo. Each TypedPhoneNumber is a pair value (phone number, phone type) with a none blank phone number.
Add a single call with a name. Each TypedCall is a pair value (phone number, call type) with a none blank phone number.
Delete all the contacts added by this PlatformContactsHelper with the corresponding sourceName and sourceType from ContactsProvider.
Delete all the calls added by this PlatformContactsHelper with the corresponding sourceName and sourceType from ContactsProvider.
Generate a list of Bitmaps based on a list of drawable resources.
Generate numberOfContacts contacts with a random name. Each contact is generated with numberOfPhoneNumbers random phone number with random phone type.
Generate a call with random call time between minimumTime, maximumTime time.