English 中文(简体)
安乐器:定期上载文件吗?
原标题:Android: Uploading a text file periodically?

如果我想要把包含一些游戏雕像的文本文件上上载到一个用于测试的网络服务器上,那么哪一种做法是最好的? 我是否与我的申请一起写了一件服务,然后当它达到一定规模时,就上载记录吗? 或者,我是否将逻辑纳入我的申请,然后在闲置时期这样做?

问题回答

我将使用Handler,以逐个启动上载。 载荷从AsyncTask

如果您希望作为<条码>活性代码的一部分定期上载(即针对用户行动),那么使用<条码>AyncTask可能是这样做的最容易的方法。 如果您希望在不由用户启动或附属于国际交易日志要素的情况下在背景中卸载,则你只需要使用<条码>服务<>。

捐款不使用服务,因为如果用户不期望使用网络连接和电话资源。

用户在使用<代码>时使用的是 la和bon。 AsyncTask。 如果您的档案从未增长到100克以上,就应当迅速发送。 如果你想上载较大的文档,“500k”,那么你或许会考虑把文件放在小线上,因为你必须牢记,手机连接是 f的。





相关问题
Best logging approach for composite app?

I am creating a Composite WPF (Prism) app with several different projects (Shell, modules, and so on). I am getting ready to implement logging, using Log4Net. It seems there are two ways to set up the ...

How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

How to validate Java logging properties files?

I have a basic facility for allowing users to remotely apply changes to the logging files in my application. Some logs are configured using java.util.logging properties files, and some are configured ...

Logging SAS scripts

I ve been developing a lot of Java, PHP and Python. All of which offer great logging packages (Log4J, Log or logging respectively). This is a great help when debugging applications. Especially if the ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

热门标签