# PhoneNumber A library which can get phone number geo location and other infomation from local or network (baidu, juhe or custom api). [![Build Status](https://travis-ci.org/xdtianyu/PhoneNumber.svg?branch=master)](https://travis-ci.org/xdtianyu/PhoneNumber) [![build status](https://git.xdty.org/tianyu/PhoneNumber/badges/master/build.svg)](https://git.xdty.org/tianyu/PhoneNumber/commits/master) [![JAR](https://img.shields.io/maven-central/v/org.xdty.phone.number/phone-number.svg)](http://central.maven.org/maven2/org/xdty/phone/number/phone-number/) [![Download](https://api.bintray.com/packages/xdtianyu/maven/phone-number/images/download.svg)](https://bintray.com/xdtianyu/maven/phone-number/_latestVersion) ## Download Grab via gradle ```groovy dependencies { compile 'org.xdty.phone.number:phone-number:0.6.11' } ``` or maven ```xml org.xdty.phone.number phone-number 0.6.11 aar ``` or JAR from [maven central](http://central.maven.org/maven2/org/xdty/phone/number/phone-number/) ## Usage 1\. Add `meta-data` to `AndroidManifest` ```xml ``` You can get `YOUR_API_KEY` from [Baidu apistore's usercenter](http://apistore.baidu.com/astore/usercenter) 2\. Add these lines to `MainActivity`, For more details, see [example](https://github.com/xdtianyu/PhoneNumber/tree/master/example) and [CallerInfo](https://github.com/xdtianyu/CallerInfo) ```java new PhoneNumber(this, new PhoneNumber.Callback() { @Override public void onResponse(INumber number) { // Do your jobs here textView.setText(number.getName()); } @Override public void onResponseFailed(INumber number) { } }).fetch("10086", "10000", "10001", "OTHER_PHONE_NUMBER"); ```