Get returno of async task : I hava a doubt. I have a class that request online json. Is works fine, but the function is void, I need the function return true or false to the activity. This is the example:

    public class Async extends AbstractService{
      public void getData(fina Context context){
        JSONObject param = new JSONObject();
        try {
            param.put("field_1",   "1");
            param.put("field_3",  "2");
            param.put("field_3", "3");

        }catch (Exception e) {}


        requester = new HttpRequestController().sendPost("auth/device", param, new HttpRequestController.CallBackRequest(){
            @Override
            public void run(final String result) {
                new Thread(new Runnable() {

                    @Override
                    public void run() {
                         if(resultObj.optBoolean("success")) {
                           //here return true or false
                         }
                    }
                }).start();

                System.out.println("test auth 1: " + result);
            }
        });
      }
    }

    public class MainActivity extends baseActivity{
     ....
         protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

         Async auth = new Async();
         auth.getUserDevice(this); //how to test is true or false ?
       }
   }