Back to project page SmartHome.
The source code is released under:
GNU General Public License
If you think the Android project SmartHome 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.geekytheory.SmartHome_App; /*from w w w .j av a 2 s. c om*/ /** * Author: Mario Prez Esteso * Website: http://geekytheory.com * Mail: mario@geekytheory.com */ import java.io.IOException; import android.os.AsyncTask; abstract class CommonAsyncTask extends AsyncTask<Void, Void, Boolean> { final MyActivity activity; CommonAsyncTask(MyActivity activity) { this.activity = activity; } @Override protected void onPreExecute() { super.onPreExecute(); } @Override protected final Boolean doInBackground(Void... ignored) { try { doInBackground(); return true; } catch (Exception e) { Utils.logAndShow(activity, "MyActivity", e); } return false; } @Override protected final void onPostExecute(Boolean success) { super.onPostExecute(success); if (success) { activity.refreshView(); } } protected void doInBackground() throws IOException { } }