Created
November 23, 2016 07:21
-
-
Save yrulee/863218c11b0bcec5046c83111d8f33c1 to your computer and use it in GitHub Desktop.
Usage of NetworkRxHelper.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import static gogolook.callgogolook2.util.NetworkRxHelper.*; | |
NetworkRxHelper rxHelper = create(mContext); | |
rxHelper.connect( | |
new OnGetApiCall() { | |
@Override | |
public ApiCall call() { | |
return null;//return ApiCall object | |
} | |
}, new OnBeforeConnect() { | |
@Override | |
public void call() { | |
} | |
}, new OnAfterConnectInBackground() { | |
@Override | |
public void call(ApiCall.ApiResponse response) { | |
} | |
}, new OnAfterConnect() { | |
@Override | |
public Boolean call(ApiCall.ApiResponse response) { | |
return null;//return true or false | |
} | |
}, new OnError() { | |
@Override | |
public void call(Context context, Throwable throwable, ApiCall.ApiResponse response, Boolean isUserAbort, Boolean isNoNetwork) { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment