The StackMob Documentation lets us know how to properly perform a query: https://developer.stackmob.com/tutorials/android/Query-an-Object
My question is what is the correct way in Java to actually extract this information from the query's inner class?
MyObject valueToReturn;
MyObject.query(MyObject.class,
new StackMobQuery().field(
new StackMobQueryField(field).isEqualTo(val)),
new StackMobQueryCallback<MyObject>() {
@Override
public void failure(StackMobException arg0) {
//nothing to see here.
}
@Override
public void success(List<MyObject> arg0) {
//
//How do I set valueToReturn = arg0.get(0)?
//or in any way access this list outside the
//inner class.
return;
}
});
There seems to be a solution here, but surely there is a better way. https://stackoverflow.com/a/5977866/1528493