Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to know why android cant download a file in main Activity . i read a lot of articles and they all said you cant do a long time operations in main activity BUT They dont have any useful explanation !
i want a Scientific reason .
Posted
Comments
Sergey Alexandrovich Kryukov 25-Dec-14 16:39pm    
Just my guess: isn't that because event-oriented UI is executed by the main activity, so any other lengthy operations would block the UI? I personally would always advise using a separate thread for network communications (and many other things), but no wonder if some library enforce that. Doesn't it make sense?
—SA
Afzaal Ahmad Zeeshan 25-Dec-14 17:22pm    
Instead of these opinion based questions. It is better to ask real questions that you've encountered. What error did you get?

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