Back to project page demo-app-android.
The source code is released under:
MIT License
If you think the Android project demo-app-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.rong.imkit.demo; /* w w w . j a va2 s . c o m*/ import com.sea_monster.core.exception.BaseException; import com.sea_monster.core.network.AbstractHttpRequest; import com.sea_monster.core.network.ApiCallback; public abstract class BaseApiActivity extends BaseActivity implements ApiCallback { public abstract void onCallApiSuccess(AbstractHttpRequest request, Object obj); public abstract void onCallApiFailure(AbstractHttpRequest request, BaseException e); @Override public void onComplete(final AbstractHttpRequest request, final Object obj) { runOnUiThread(new Runnable() { public void run() { onCallApiSuccess(request, obj); } }); } @Override public void onFailure(final AbstractHttpRequest request, final BaseException e) { runOnUiThread(new Runnable() { public void run() { onCallApiFailure(request, e); } }); } }