public interface FHActCallback
success(com.feedhenry.sdk.FHResponse) and fail(com.feedhenry.sdk.FHResponse) methods will run on the UI thread.
You can either implement this interface in your app's own classes or using anonymous inner classes.
For example:
Implementing as part of a class:
public class Foo implements FHActCallback {
@Override
public void success(FHResponse pResp){
//process response data
}
@Override
public void fail(FHResponse pResp){
//process error data
}
}
...
FHActRequest request = FH.buildActRequest("readData, new JSONObject());
request.executeAsync(this);
Using an anonymous class:
FHActRequest request = FH.buildActRequest("readData", new JSONObject());
request.executeAsync(new FHActCallback(){
@Override
public void success(FHResponse pResp){
//process response data
}
@Override
public void fail(FHResponse pResp){
//process error data
}
});
| Modifier and Type | Method and Description |
|---|---|
void |
fail(FHResponse pResponse)
Will be run if the action call is failed
|
void |
success(FHResponse pResponse)
Will be run if the action call is successful
|
void success(FHResponse pResponse)
pResponse - the response datavoid fail(FHResponse pResponse)
pResponse - the response dataCopyright © 2016 Red Hat. All rights reserved.