我有一个小型Android应用程序,我需要每隔几秒钟在其中执行一些FTP操作。在了解到在UI线程上运行网络内容是Android不太喜欢的事情之后,我找到了这个解决方案://ThisclassgetsdeclaredinsidemyActivityprivateclassCheckFtpTaskextendsAsyncTask{protectedVoiddoInBackground(Void...dummy){Thread.currentThread().setName("CheckFtpTask");//HereI'lldotheFTPstuffftpStuff();returnnul