English 中文(简体)
如果没有数据转移,移动数据连接是电池杀手吗?
原标题:Mobile Data connection is a battery killer if there is no data transfering?
  • 时间:2011-10-02 14:14:30
  •  标签:
  • java
  • android

I m developing an app that use Mobile Data connection (always GPRS) to upload in a loop each 5 minutes 300 kb of data. Between two upload i see that the data connection remains up (gprs logo on status bar) even if there aren t data transferring....

In this time (between two upload) the battery is used by the Mobile Data connection? Do you think that i should use this method to disable and enable connection between uploads to save the batterylife or is not helpfull?

If is it so...how can i use that code in my Service Class such as a function, without create a new class? THanx from a noob!

EDIT

The app is for my personal use and the app have the entire control of phone (the phone is alone and it doesn t interact with the user). So i can sto all data connection...but i can t use that code as i want (as a function!) Help me!

EDIT 2

Anyway i m able to enable and disable "airplane mode", but the reconnection require minim 13-14 seconds. May be this help to save battery in the "dead time"?

最佳回答

I m developing an app that use Mobile Data connection (always GPRS) to upload in a loop each 5 minutes 300 kb of data.

你们正在使用用户选择的数据链接。 如果你愿意,你可以选择跳板地做WiFi的工作,尽管我不清楚为什么。

此时此刻(在两个上载之间),移动电话数据连接使用电池?

GSM或清洁发展机制无线电台总是消耗电池。 在主动数据转让期间,它消耗量更大,但总是在(除非该装置在飞机上)。

您是否认为,应当利用这种方法来消除并促成上载之间的连接,以挽救电池的生物或无助。

只有当你是唯一能够申请的人时,你才会使用安乐器2.2(或更老),而且你不会忘记你打电话的我。

你们的代码是:它可能冲破某些装置,今后可能解体,因为它绕过SDK。 此外,如果不是你的电话,我并不肯定你为什么认为你有权躲避他人的装置。 而且,为了把它推向外,你不能再持有使用该黑板的必要许可,就像2.3一样。

问题回答

GPRS costs a bit of battery, but generally, most phones are on "always on" data anyway. Other things that are really draining the battery are wake-locks. Are you keeping any of those? Why is it GPRS and not UTMS, for another matter? For the link you provided, that s a method to turn on mobile data usage for all apps. that s something you really don t want to do, as your users will be quite unhappy. There might be specific cases, (restricted deployment to tightly controlled handsets) were this makes sense, but overall, it won t matter.

Btw,在你和roid体环境中(Settings->System->Battery),你可以发现,你的用量是如何消耗电池的。

[edit] in the case you describe, the best thing would be to really turn of the mobile data usage while you re not using it. But this will be rather tricky (without rooting your phone, i m not even sure it s possible) and it ll take you a long time. Make sure you will really need that extrac percentage of juice.
As said in the post you linked, you ll need to have an Android Version <2.3 (up to 2.2) and the MODIFY_PHONE_STATE Permission to disable network. It s not possible on Gingerbread.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

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 ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签