I am working on a project which uses multiple Asynctasks
and I want all the tasks should run parallel.As of API 13, Android provides AsyncTask.executeOnExecutor(Executor exec, Params... params)
method for parallel execution.But I have to do the project for all API levels.Is it possible to run parallel executions in lower versions using AsynTask
or some other framework?
Asked
Active
Viewed 97 times
0

Spring Breaker
- 8,233
- 3
- 36
- 60
-
You can of course, but keep in mind that several async task means that the CPU will be more used. And also Async taks are now executed serial. You can force the "parallel mode" but it is not adviced since lots of android phone have single core CPU. – An-droid Aug 27 '13 at 07:24
-
What are you using asynctask for ? – An-droid Aug 27 '13 at 07:25
-
I am using it to send mail in every 2 sec using Java Mail API. Could you please give some reference link to achieve this? – Spring Breaker Aug 27 '13 at 07:27
-
[See this to answer your question][1] [1]: http://stackoverflow.com/questions/4068984/running-multiple-asynctasks-at-the-same-time-not-possible – Ndupza Aug 27 '13 at 07:32
-
Java mail App is not easy going.. For the every 2 sec part i suggest you use a Service – An-droid Aug 27 '13 at 07:33