Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i read an article about service & AsyncTask in android . it explains for non interactive operations which take a long Time you have to use Service . after that it introduces IntentService without any useful Explanation ! it just only says many programmers forget to Stop Service and it causes a lot of problems so if you want to avoid this problems you should use IntentService !!! (what does it mean ? )
now i want to know which one is better and what is the main difference between this 2 classes
Posted

1 solution

Service:It is basically a component which runs in the background witout direct interaction with the user.It's mostly used for long running operations.

Examples : Checking new updates every day,fb & mail notifications.

IntentService:It's used to perform certain task in the background.Once it's done,the instance of IntentService will be terminated by itself automatically.

Example : downloads
 
Share this answer
 
Comments
seyed mahmud shahrokni 28-Dec-14 12:10pm    
your Explanation was very useful . tnx a lot .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900