Android TCP networking: AsyncTask vs. IntentService -


i’m building android app needs communicate server on tcp sockets. know networking should done off ui thread i’m not sure “threading approach” go with: intentservice or asynctask. read should use services if have run continually in background, , use asynctask one-off tasks find rather vague. application need communicate server on startup , when user clicks button, seem favour asynctask (since seems one-off task). benefit , downside of using asynctask on intentservice?

i think shouldn't use async task, because async tasks runs in serial execution. slow down application if user go or press multiple times. can use thread handler or can use event bus library. or network task can use volly.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -