package org.xdty.example;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.TextView;

import org.xdty.phone.number.PhoneNumber;
import org.xdty.phone.number.model.INumber;

public class MainActivity extends AppCompatActivity {

    public final static String TAG = MainActivity.class.getSimpleName();

    TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        textView = (TextView) findViewById(R.id.text);

        new PhoneNumber(this, new PhoneNumber.Callback() {
            @Override
            public void onResponseOffline(INumber number) {
            }

            @Override
            public void onResponse(INumber number) {
                // Do your jobs here
                String s = number.getNumber() +
                        ": " +
                        number.getType().getText() +
                        ", " +
                        number.getName() +
                        ", " +
                        number.getCount() +
                        " : " +
                        number.getProvince() + " " + number.getCity() + " " + number.getProvider();
                textView.setText(s);
                Log.d(TAG, s);
            }

            @Override
            public void onResponseFailed(INumber number) {
            }
        }).fetch("10086");
        // "10086", "10000", "10001", "02151860253", "4001001673", "-1", "-2", "550", "551", "559", "569"
    }

}

@@ -668,24 +668,58 @@
 allback() %7B%0A
+%0A            String result = %22%22;%0A%0A
             
@@ -780,32 +780,401 @@
 umber number) %7B%0A
+                String s = number.getNumber() +%0A                        %22: %22 +%0A                        number.getType().getText() +%0A                        %22, %22 +%0A                        number.getName() +%0A                        %22 : %22 +%0A                        number.getProvince() + %22 %22 + number.getCity() + %22 %22 + number.getProvider();%0A                Log.d(TAG, s);%0A
             %7D%0A%0A 
@@ -1689,32 +1689,68 @@
 .getProvider();%0A
+                result += s + %22%5Cn%22;%0A
                 
@@ -1766,17 +1766,22 @@
 setText(
-s
+result
 );%0A     
@@ -1937,29 +1937,8 @@
 tch(
-%2210086%22);%0A        // 
 %22100
@@ -2014,16 +2014,32 @@
 , %22551%22,
+%0A               
  %22559%22, 
@@ -2043,16 +2043,18 @@
 %22, %22569%22
+);
 %0A    %7D%0A%0A

update example