Skip to content

A library to read all contacts with emails and mobile numbers. It also supports multiple emails and mobile numbers.

Notifications You must be signed in to change notification settings

raghavsatyadev/ContactFetcher

Repository files navigation

ko-fi

ContactFetcher

An app to read all contacts with emails and mobile numbers. It also supports multiple emails and mobile numbers.

Current version:

Setup

To use this library your minSdkVersion must be >= 16.

In the build.gradle of your app module add:

    dependencies {
        implementation 'com.rocky.contactfetcher:contactfetcher:x.x.x'
    }

Example

    ContactFetcher.getContacts(this, new ContactListener<Contact>() {
          @Override
          public void onNext(Contact contact) {
              // add contacts to list
          }

          @Override
            public void onError(Throwable error) {
              // log the error
          }

          @Override
          public void onComplete() {
             // process complete
          }
      });

in onRequestPermissionsResult() method

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
                                           @NonNull int[] grantResults) {
        ContactFetcher.resolvePermissionResult(this, requestCode, permissions, grantResults);
    }

This library is highly inspired by RXContacts : https://github.com/UlrichRaab/rx-contacts

About

A library to read all contacts with emails and mobile numbers. It also supports multiple emails and mobile numbers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages