Skip to content

jrejaud/TwilioLookup

Repository files navigation

TwilioLookup

Build Status Android Arsenal

Simple Android wrapper for Twilio's Phone Lookup API

Example

TwilioLookup.setAuthorization("yourTwilioAccountSid", "yourTwilioAuthToken");

TwilioLookup.lookup("theNumberYouWantToLookup", new TwilioLookup.OnResponseCallback() {
    @Override
    public void onValidResponse(TwilioLookupResponse response) {
        Log.d("TAG","Success, country code: "+response.getCountryCode()+" "+response.getCarrier().getName());
    }

    @Override
    public void onInvalidResponse(Response response) {
        Log.d("TAG","Failure, phone number is not valid, "+response.message());
     }

     @Override
    public void onFailure(Throwable throwable) {
        Log.e("TAG", "Error: " + throwable.toString());
    }
});

Installation

See JitPack for more information.

allprojects {
	repositories {
		maven { url "https://jitpack.io" }
	}
}
dependencies {
	    compile 'com.github.jrejaud:TwilioLookup:v1.0'
}

About

Android wrapper for Twilio's Phone Lookup API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages