Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我必须解析来自服务器的数据。我在一些站点中看到了一些使用的示例AsyncTask,一些使用回调方法的示例,一些使用线程和处理程序的示例。
AsyncTask
哪一个最适合从服务器解析数据。
AsyncTasks、Threads 和 Handlers 与解析数据完全无关,它们只是允许您将长时间运行的处理任务从 UI 线程中移开。无论如何,对于初学者,我建议AsyncTask在 Android 环境中记录良好、支持和最广泛使用。