|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FHActCallback
A FHActCallback will be used to execute code after a FH API request finishes running on a background thread. This will make sure the UI does not freeze.
The success(com.feedhenry.sdk.FHResponse)
and fail(com.feedhenry.sdk.FHResponse)
methods will run on the main UI thread.
You can either implement this interface in your app's own classes or using anonymous inner class.
For example:
FHActRequest request = FH.buildActRequest("readData", new JSONObject());
request.executeAsync(new FHActCallback(){
public void success(FHResponse pResp){
//process response data
}
public void fail(FHResponse pResp){
//process error data
}
})
Method Summary | |
---|---|
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 |
Method Detail |
---|
void success(FHResponse pResponse)
pResponse
- the response datavoid fail(FHResponse pResponse)
pResponse
- the response data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |