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.
我正在尝试实现IntentService,我想在其中执行 HTTP 请求。
IntentService
我不想要求代码我只需要建议如何做到这一点。我感谢每一个帮助。谢谢。
您需要将数据传输分解为块并实现一个循环来处理数据传输,然后在每次迭代时检查网络连接。例如:
foreach(String block as data) { if(isConnected()) { // Transfer block } else { // Not connected break; } }