- Forum posts: 2
Aug 8, 2018, 11:22:39 AM via Website
Aug 8, 2018 11:22:39 AM via Website
I am working as an Android developer. I am facing an issue is I can't access the results inside the onCompleted method, I want to get the data from an onCompleted method and send to my view.
public double walletApiCall(final Activity myactivity, final String addresses) {
double unCon_balance;
Ion.with(myactivity)
.load(URL)
.asString()
.setCallback(new FutureCallback<String>() {
@Override
public void onCompleted(Exception e, String result) {
JSONObject tomJsonObject = null;
try {
tomJsonObject = new JSONObject(result);
} catch (JSONException e1) {
e1.printStackTrace();
}
walletApiCall(result,myactivity);
System.out.println("unCon_balance2: "+ unCon_balance);
}
});
return unCon_balance;
}
Thanks & Regards
Camillelola
Mindmajix.com
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.