Back to project page Android-API.
The source code is released under:
Apache License
If you think the Android project Android-API 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 com.clearblade.platform.api.internal; /*w w w. ja v a 2 s . co m*/ import com.clearblade.platform.api.ClearBladeException; import android.os.AsyncTask; public class UserTask extends AsyncTask<RequestEngine, Void, PlatformResponse>{ PlatformCallback _callback; public UserTask(PlatformCallback callback){ _callback = callback; } @Override protected void onPostExecute(PlatformResponse result){ super.onPostExecute(result); if(result.getError()){ Util.logger("CBUserTask", "User call failed: " + result.getData(), true); _callback.error(new ClearBladeException("Call to user failed: " + result.getData())); }else{ _callback.done((String)result.getData()); } } @Override protected void onPreExecute() { super.onPreExecute(); } @Override protected PlatformResponse doInBackground(RequestEngine... params) { return params[0].execute(); } }