Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.feedhenry.sdk
Interface FHActCallback

    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

### success

    void success(FHResponse pResponse)

  Will be run if the action call is successful

  Parameters:
    `pResponse` - the response data

### fail

    void fail(FHResponse pResponse)

  Will be run if the action call is failed

  Parameters:
    `pResponse` - the response data

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD