title: how to change the value of a global variable within a inner class
body: <p>i have this function to retrieve access token from the server</p>
  
  <pre><code>public void retrieveAccessTokenfromServer() {
      Ion.with(this)
              .load("http://2401a7dd.ngrok.io/token")
              .asJsonObject()
              .setCallback(new FutureCallback&lt;JsonObject&gt;() {
                  @Override
                  public void onCompleted(Exception e, JsonObject result) {
                      if (e == null) {
                          String identity = result.get("identity").getAsString();
                          VideoActivity.this.accessToken=result.get("token").getAsString();
                          debug.setText(VideoActivity.this.accessToken);
  
                      } else {
                          Toast.makeText(VideoActivity.this,
                                  R.string.error_retrieving_access_token, Toast.LENGTH_SHORT)
                                  .show();
                      }
  
                  }
              });
  
  }
  </code></pre>
  
  <p>Outside that function at the top i have a global variable 'String accessToken' which i want to assign it with an access token from the server using this function. My problem is that the global variable does not take the value assigned to it in onCompleted method. I believe this is because it is used in inner class that why it can not take any value. The debug.set is working properly as it is, but if i put it ouside is printing nothing</p>
  
  <p>Any help how to change the value of a global variable within a inner class</p>