Skip to content

Instantly share code, notes, and snippets.

View ItsBluee's full-sized avatar
🏠
Working from home

Zuber Shaikh ItsBluee

🏠
Working from home
View GitHub Profile
@piyush-malaviya
piyush-malaviya / ContactHelper.java
Last active December 22, 2021 06:06
Contact helper class for fetching all contact details from contact id.
public class ContactHelper {
private static final String TAG = ContactHelper.class.getSimpleName();
public static ModelContact getContactDetails(final Context context, String contactId) {
ModelContact contact = new ModelContact();
contact.setContactId(contactId);
Cursor cursor = context.getContentResolver().query(ContactsContract.Data.CONTENT_URI,