title: How return response using okhttp library from class method in activity method
body: <p>I want to get response using enque process in okhttp but did not get exact solution here is my code 
  Activity Code</p>
  
  <pre><code> public void homeFragmentDataImplementation() {
   Notification notification = new Notification();
   kProgressHUD = notification.activityIndicator(mActivity);
   new Thread(new Runnable() {
       @Override
       public void run() {
           OkHttpRequest okHttpRequest = new OkHttpRequest();
           homeApiResponse = okHttpRequest.getOkHttpRequest(URLS.HOMESCREEN_API +Utility.getDeviceId(mFragment.getContext()));                     handler.sendEmptyMessage(1);
       }}).start();
  }
   private Handler handler = new Handler(){
       @Override
       public void handleMessage(Message msg) {
           if(msg.what==1) {
  
               Notification notification = new Notification();
               notification.scheduleDismiss(kProgressHUD);
               swipeContainer.setRefreshing(false);
               new JsonReadingModel(mActivity,homeApiResponse);
               homeScreenBusinessAdapter.notifyDataSetChanged();
           }
       }
   };
  </code></pre>
  
  <p>here is my okhttp class method for getting response and i get response in onResponse method but its give me null in activity code </p>
  
  <pre><code> OkHttpClient client = new OkHttpClient();
      String mResponse;
      public String getOkHttpRequest(String url) {
          try {
  
              Request request = new Request.Builder()
                      .url(url)
                      .build();
  
             client.newCall(request).enqueue(new Callback() {
                  @Override
                  public void onFailure(Call call, IOException e) {
  
                  }
  
                  @Override
                  public void onResponse(Call call, Response response) throws IOException {
                      mResponse=response.body().string();
  
  
                  }
              });
  
              return mResponse;
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          return "";
      }
  </code></pre>