Android:监控CPU即时工作频率和电量电池信息

2015年10月07日 Android 7条评论 阅读7452次

这是一个可以随时更新显示android设备上CPU工作频率和工作电流、工作电压、电池剩余量的软件。

运行在Android设备上,启动本程序之后,启动一个服务,根据用户自定义的选择设置,可在任何窗口下显示当前CPU工作频率等状态,显示当前电压电流电池容量等信息。

这些信息是以浮窗的形式呈现的,因为申请了《android.permission.SYSTEM_ALERT_WINDOW》的权限,所以有些Android设备上可能会因为本身安全隐私的设置,导致浮窗不能显示。遇到这个问题,去设备的安全选项中修改下设置就可以了。

为避免浮窗上文字信息挡住屏幕上某些信息,所以把浮窗做成了可以拖动的。

用了一个服务,用来每隔一秒钟刷新一次浮窗上的数据。

注册了一个广播接收者,用来接收《ACTION_BATTERY_CHANGED》的广播,从而进一步获取battery相关的信息。

PS:一个技术上的问题提示:ACTION_BATTERY_CHANGED广播不能在AndroidManifest.xml中注册,只可以在java中动态注册,否则,你是不可能接收到这个广播的。

Image


Image


Image

github地址:

https://github.com/will86/android-runninginfo

欢迎各位大牛fork、push。

谢谢!

分享本文至:

WRITTEN BY

avatar
本文标签:androidcpubattery
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

7 条评论

  1. avatar kosarkomur

    <a href="http://www.ibrahimoner.com/ray-ban-sunglasses-4115-mens-sunglassesa">ray ban sunglasses 4115 mens</a> <a href="http://www.quickbeautyhq.com/san-francisco-49ers-tisa-snapback-cap-black-red-hatc">san francisco 49ers tisa snapback cap black red</a> <a href="http://www.epointsclub.com/macy-s-oakley-sunglasses-nose-parts-sunglassesg">macy s oakley sunglasses nose parts</a> <a href="http://www.alaskanuber.com/nike-kwazi-india-price-skox">nike kwazi india price</a> <a href="http://www.ycbrowsbeauty.com/jordan-11-columbian-yellowing-skoc">jordan 11 columbian yellowing</a> <a href="http://www.gfatraining.com/billig-nike-flyknit-lunar-3-dam%C3%A4nner-wei%C3%9F-skob">billig nike flyknit lunar 3 dam盲nner wei脽</a>
    kosarkomur http://www.kosarkomur.com/

  2. avatar karibiankomu

    <a href="http://www.seocontenidos.com/nike-internationalist-premium-white-trainers-shoesh">nike internationalist premium white trainers</a> <a href="http://www.elitexgaming.com/nike-free-tr-femmes-gris-violet-chaussuresl">nike free tr femmes gris violet</a> <a href="http://www.chezpenny.com/mens-nike-flyknit-lunar-1-pink-grey-shoesj">mens nike flyknit lunar 1 pink grey</a> <a href="http://www.williherren.com/penn-state-nittany-lions-47-ncaa-47-clean-up-cap-hatk">penn state nittany lions 47 ncaa 47 clean up cap</a> <a href="http://www.alimonis.com/nike-air-max-uptempo-gr%C3%B8n-skoj">nike air max uptempo gr酶n</a> <a href="http://www.galvomode.com/navy-sleeveless-polo-shirt-poloh">navy sleeveless polo shirt</a>
    karibiankomu http://www.karibiankomu.com/

  3. avatar glamourspausa

    <a href="http://www.adeohome.com/nike-flyknit-lunar-3-femminile-argento-rosa-kurpesd">nike flyknit lunar 3 femminile argento rosa</a> <a href="http://www.kozmovip.com/wei%C3%9F-adidas-superstar-gold-schuhel">wei脽 adidas superstar gold</a> <a href="http://www.jorgevsells.com/femminile-asics-gel-kinsei-5-rosso-nero-skof">femminile asics gel kinsei 5 rosso nero</a> <a href="http://www.transitionbh.com/salomon-fellraiser-oransje-light-footf">salomon fellraiser oransje light</a> <a href="http://www.bekbox.com/nike-lebron-12-university-rosso-hyper-crimson-bianca-nero-sneakerd">nike lebron 12 university rosso hyper crimson bianca nero</a> <a href="http://www.larastart.com/nike-free-flyknit-3.0-uomo-bl%C3%A5-schuhef">nike free flyknit 3.0 uomo bl氓</a>
    glamourspausa http://www.glamourspausa.com/

  4. avatar rohanchougule

    <a href="http://www.kiprahrakyat.com/adidas-zx-750-dark-fl%C3%A5den-skoe">adidas zx 750 dark fl氓den</a> <a href="http://www.bmwoodworx.com/cleveland-indians-black-jersey-nflh">cleveland indians black jersey</a> <a href="http://www.stpetereads.com/chicago-bears-stitched-jersey-nfli">chicago bears stitched jersey</a> <a href="http://www.madebyizzaroo.com/von-miller-ladies-jersey-nflh">von miller ladies jersey</a> <a href="http://www.eliteogame.com/nike-roshe-run-dam%C3%A6nd-custom-shoese">nike roshe run dam忙nd custom</a> <a href="http://www.betakimassage.com/ralph-lauren-rugby-tops-qld-poloh">ralph lauren rugby tops qld</a>
    rohanchougule http://www.rohanchougule.com/

  5. avatar nike kd 8 guld gr氓

    <a href="http://www.shiftcampus.com/nike-zoom-pegasus-31-kvinners-gr%C3%B8nn-obuvl">nike zoom pegasus 31 kvinners gr酶nn</a> <a href="http://www.fiestanetwork.com/nike-soccers-shoes-sky-blue-shoesh">nike soccers shoes sky blue</a> <a href="http://www.sunbeltsaves.com/nike-sb-dunk-mid-pro-nero-varsity-rosso-scarpei">nike sb dunk mid pro nero varsity rosso</a> <a href="http://www.drmastella.com/nike-air-max-90-em-grau-schwarz-schuhej">nike air max 90 em grau schwarz</a> <a href="http://www.khzrubber.com/houston-texans-new-era-2017-nfl-training-camp-9twenty-cap-hath">houston texans new era 2017 nfl training camp 9twenty cap</a> <a href="http://www.jkdeskisehir.com/femmes-air-jordan-retro-12-tout-oranger-chaussuresh">femmes air jordan retro 12 tout oranger</a>
    [url=http://www.bestoftumblr.com/nike-kd-8-guld-gr%C3%A5-skoj]nike kd 8 guld gr氓[/url]

  6. avatar lavaforchange

    <a href="http://www.seymourdugan.com/nike-kobe-7-gelb-schwarz-schuhej">nike kobe 7 gelb schwarz</a> <a href="http://www.dkstekstil.com/nike-kobe-11-kvinders-gr%C3%B8n-appelsin-skoh">nike kobe 11 kvinders gr酶n appelsin</a> <a href="http://www.thegillssell.com/air-jordan-reveal-bleu-jaune-chaussuresh">air jordan reveal bleu jaune</a>
    lavaforchange http://www.lavaforchange.com/

  7. avatar 呜炀裆

    感谢博主!

欢迎留言




用户登录

sitemap