TwilioLookup

Additional

Language
Java
Version
v1.0 (Mar 16, 2016)
Created
Mar 17, 2016
Updated
Mar 26, 2016 (Retired)
Owner
Jordan Réjaud (jrejaud)
Contributors
Ravindra Kumar (ravidsrk)
Jordan Réjaud (jrejaud)
2
Activity
Badge
Generate
Download
Source code

Announcement

TwilioLookup

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'
}