Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.app.Activity;
- import android.os.AsyncTask;
- import cz.pesek.vareni.activity.ActivityMain;
- public class AsyncTaskCopyDatabase extends AsyncTask<Void, Integer, Void> {
- //Constructor to get passed values, Context to obtain View, activity to end SplashScreenActivity
- public AsyncTaskCopyDatabase(Activity a){
- activity = a;
- }
- //Method which runs on Background Thread
- @Override
- protected Void doInBackground(Void... params) {
- //TODO: Here do the network intesive job
- // You can also return something else, but than you must change Type in onPostExecute
- return null;
- }
- @Override
- protected void onPostExecute(Void v){
- // UI Thread -> Update Views, etc...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement