Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Run multiple async task simultaneously

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 289
    Comment on it

    Do you know that android version higher than gingerbread doesn't support multiple async task to run parellely but gingerbread ans lower version supports this functionality.

    So if you want to run multiple task at a time you have to check api version and then apply Executor service named Thread pool executor service that makes pools of service and runs them parellely.

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        new task().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, param);
    } else {
        new task().execute(param);
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: