是我的Andr​​oid应用程序排水电池

是我的Andr​​oid应用程序排水电池

本文介绍了是我的Andr​​oid应用程序排水电池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个游戏为Android。它采用了表面观,并使用所提供的标准的2D绘图API的排序。当我第一次放出了游戏,我在做各种各样的愚蠢之类的东西重新绘制每一帧9补丁,同样的文字。因为我已经优化,这在很大程度上通过绘制为位图对象,并绘制它们的每一帧,只能重新绘制需要的时候到Bitmap对象。

I'm developing a game for Android. It uses a surface view and uses the sort of standard 2D drawing APIs provided. When I first released the game, I was doing all sorts of daft things like re-drawing 9-patches on each frame and likewise with text. I have since optimised much of this by drawing to Bitmap objects and drawing them each frame, only re-drawing onto the Bitmap objects when required.

我已经收到有关电池耗尽之前的投诉,并按照我修改我想知道(科学),如果我做任何改进。不幸的是,我没有任何之前的数据去了,所以这将是最有用的性能比较一些其他的游戏。

I've received complaints about battery drain before, and following my modifications I'd like to know (scientifically) if I've made any improvements. Unfortunately, I don't have any prior data to go by, so it would be most useful to compare the performance to some other game.

我一直在运行Traceview,并使用它的结果主要用于识别CPU,耗时方法的目的。

I've been running Traceview, and using the results of it mostly for the purposes of identifying CPU-time-consuming methods.

所以 - ?什么是确定我的应用程序的电池性能的最佳方式,什么是一个很好的标杆

我知道我可以看一下通过设置不同的应用程序的%S,而这又是不科学的,因为我从这次得到的数字也取决于所发生的事情中的所有其他应用程序。我已经通过谷歌的文档(大部分)看起来,虽然信息是明确的,你的应该的是节省电池(和它给偶尔的提示,如何),还有就是我的一点迹象可以衡量好我的应用程序正在执行。我想的最后一件事是电池消耗在Android Market!

I know I can look at the %s of different apps through the settings, but this is again unscientific, as the figure I get from this also depends on what's happening in all of the other apps. I've looked through (most of) Google's documentation, and although the message is clear that you should be saving battery (and it gives the occasional tip as to how), there is little indication of how I can measure how well my app is performing. The last thing I want are more complaints of battery drain in the Android Market!

在此先感谢。

感谢您的有益的建议/建议。我真正想知道的是如何,我可以使用来自Traceview传来的数据(即:以毫秒为单位的CPU时间对本场比赛的每一帧花),以确定电池的使用(如果这是在所有可能的) 。读回我原来的问题,我可以看到我是一个有点模糊。再次感谢。

Thanks for all your helpful advice/suggestions. What I really want to know is how I can use the data coming from Traceview (ie: CPU time in ms spent on each frame of the game) to determine battery usage (if this is at all possible). Reading back on my original question, I can see I was a bit vague. Thanks again.

推荐答案

下面是我的建议:

我看的功耗,同时发展我的应用程序(有时轮询传感器在&LT率;为25ns),使用的。检查出来,这听起来像这样你正在寻找可能的内容,应用程序会告诉你,你正在使用毫瓦,J什么,或相对于系统的其余部分。此外,结果由CPU,无线网络,显示屏坏了,(安装了其他无线电设备)。唯一的缺点是,它是针对特定手机型号写的,我却用它与我的EVO 4G,Galaxy S的(斯普林特史诗),和英雄大获成功。

I watch power consumption while developing my apps (that sometimes poll the sensors at rates of <25ns) using PowerTutor. Check it out, it sounds like this maybe what you are looking for, the app tells you what you are using in mW, J, or relative to the rest of the system. Also, results are broken down by CPU, WiFi, Display, (other radios installed). The only catch is that it is written for a specific phone model, but I use it with great success on my EVO 4G, Galaxy S (Sprint Epic), and Hero.

祝你好运,史蒂夫

这篇关于是我的Andr​​oid应用程序排水电池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 02:53