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

2015年10月07日 Android 9条评论 阅读4972次

这是一个可以随时更新显示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
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

9 条评论

  1. avatar bhcsboosters

    <a href="http://www.rellthewolf.com/76ers-3-allen-iverson-red-reebok-10th-throwback-stitched-nba-jersey-nflr">76ers 3 allen iverson red reebok 10th throwback stitched nba jersey</a> <a href="http://www.fincasagaro.com/nike-air-max-bw-1996-skoa">nike air max bw 1996</a> <a href="http://www.mushigiftpack.com/adidas-nitrocharge-yellow-yellow-sneakere">adidas nitrocharge yellow yellow</a> <a href="http://www.glplawyers.com/air-jordan-retro-5-metallic-s%C3%B8lv-2015-kurpesa">air jordan retro 5 metallic s酶lv 2015</a> <a href="http://www.canditatenext.com/adidas-eqt-kids-shoes-brown-green-sneakerb">adidas eqt kids shoes brown green</a> <a href="http://www.ganuocdua.com/nike-blazer-low-womens-black-yellow-shoesf">nike blazer low womens black yellow</a>
    bhcsboosters http://www.bhcsboosters.com/

  2. avatar pierrekennis

    <a href="http://www.lukasshort.com/coach-hampton-tote-coachr">coach hampton tote</a> <a href="http://www.eringjewels.com/nba-jerseys-philadelphia-76ers-allen-iverson-3-white-jerseys-nfle">nba jerseys philadelphia 76ers allen iverson 3 white jerseys</a> <a href="http://www.harpiabd.com/nike-zoom-all-out-womens-red-purple-sportsb">nike zoom all out womens red purple</a> <a href="http://www.ilikeruffles.com/barato-nike-lebron-13-mujeres-p%C3%BArpura-trainerse">barato nike lebron 13 mujeres p煤rpura</a> <a href="http://www.bobbyburrage.com/nike-mercurial-vapor-vii-skor">nike mercurial vapor vii</a> <a href="http://www.mecazadam.com/nashville-predators-practice-jersey-nflr">nashville predators practice jersey</a>
    pierrekennis http://www.pierrekennis.com/

  3. avatar bootsoffprice

    <a href="http://www.kainjipark.com/nike-free-rn-toddler-verkauf-january-2016-kurpesc">nike free rn toddler verkauf january 2016</a> <a href="http://www.lapthelakes.com/ray-ban-womens-vagabond-cat-eye-polarized-sunglasses-glasses-sunglassesc">ray ban womens vagabond cat eye polarized sunglasses glasses</a> <a href="http://www.delmaroffice.com/nike-mens-joey-bosa-limited-red-jersey-los-angeles-chargers-nfl-99-2018-pro-bowl-nflr">nike mens joey bosa limited red jersey los angeles chargers nfl 99 2018 pro bowl</a> <a href="http://www.medieneinsatz.com/nike-free-flyknit-5.0-plus-for-sale-skoa">nike free flyknit 5.0 plus for sale</a> <a href="http://www.linexcanton.com/nike-flyknit-trainer-volt-green-mount-sneakerf">nike flyknit trainer volt green mount</a> <a href="http://www.saskostomy.com/nike-flyknit-lunar-3-p%C3%BArpura-door-kurpesa">nike flyknit lunar 3 p煤rpura door</a>
    bootsoffprice http://www.bootsoffprice.com/

  4. avatar mikespothole

    <a href="http://www.lauraundleon.com/nike-dunk-all-black-cmft-runningf">nike dunk all black cmft</a> <a href="http://www.michaelphenow.com/nfl-pittsburgh-steelers-color-rush-limited-antonio-brown-mens-football-jersey-nflv">nfl pittsburgh steelers color rush limited antonio brown mens football jersey</a> <a href="http://www.kguides.com/air-jordan-13-retro-playoffs-trainersa">air jordan 13 retro playoffs</a> <a href="http://www.nvusforex.com/adidas-neo-derby-bleu-scarpec">adidas neo derby bleu</a> <a href="http://www.dinerwaresb.com/air-jordan-retro-13-barn-r%C3%B8d-gul-kurpesc">air jordan retro 13 barn r酶d gul</a> <a href="http://www.slipoverfx.com/holbrook-oakley-sunglasses-ice-sunglassesg">holbrook oakley sunglasses ice</a>
    mikespothole http://www.mikespothole.com/

  5. avatar londonekiden

    <a href="http://www.fleetboilers.com/nike-femminile-air-max-tailwind-7-in-esecuzione-scarpa-kit-butyc">nike femminile air max tailwind 7 in esecuzione scarpa kit</a> <a href="http://www.jettstreaminc.com/nike-air-max-lunar-1-gr%C3%A5-volt-neon-obuvc">nike air max lunar 1 gr氓 volt neon</a> <a href="http://www.maverickviral.com/hommes-asics-gel-lyte-5-orange-vert-scarped">hommes asics gel lyte 5 orange vert</a> <a href="http://www.iubhlis.com/adidas-neo-high-braun-gr%C3%BCn-obuvc">adidas neo high braun gr眉n</a> <a href="http://www.djterryhunter.com/jordan-1-flight-azul-and-blanco-chaussuresg">jordan 1 flight azul and blanco</a> <a href="http://www.msdarby.com/nike-lunarepic-low-flyknit-vert-bay-chaussuresa">nike lunarepic low flyknit vert bay</a>
    londonekiden http://www.londonekiden.com/

  6. avatar jenalgroup

    <a href="http://www.miendiation.com/von-miller-jersey-signed-nflu">von miller jersey signed</a> <a href="http://www.powfarm.com/adidas-zx-850-fiyat-skou">adidas zx 850 fiyat</a> <a href="http://www.nongmobacon.com/nike-lunar-tempo-black-red-runninge">nike lunar tempo black red</a> <a href="http://www.rentalloka.com/y-3-qasa-high1-zapatosu">y 3 qasa high1</a> <a href="http://www.casamentosweb.com/jordan-retro-13-hyper-rosa-dam%C3%A4nner-chaussuresa">jordan retro 13 hyper rosa dam盲nner</a> <a href="http://www.perheopas.com/elite-leonard-williams-jersey-new-york-jets-92-alternate-navy-blue-nflg">elite leonard williams jersey new york jets 92 alternate navy blue</a>
    jenalgroup http://www.jenalgroup.com/

  7. avatar brickpopusa

    <a href="http://www.factorxf.com/coach-wristlet-clutch-design-coache">coach wristlet clutch design</a> <a href="http://www.fikretkuskan.com/adidas-forum-mid-originals-jazz-shoesb">adidas forum mid originals jazz</a> <a href="http://www.loisiroptique.com/adidas-neo-label-wei%C3%9F-skos">adidas neo label wei脽</a> <a href="http://www.daonmobile.com/versace-belt-price-singapore-beltr">versace belt price singapore</a> <a href="http://www.robineliza.com/mackage-bag-up-xx-mackagec">mackage bag up xx</a> <a href="http://www.cinselpaketin.com/nike-flyknit-lunar-1-blue-skow">nike flyknit lunar 1 blue</a>
    [url=http://www.brickpopusa.com/]brickpopusa[/url]

  8. avatar agriind

    <a href="http://www.agriind.com/ray-ban-justin-wayfarer-4165-sunglassesr">ray ban justin wayfarer 4165</a> <a href="http://www.rapheroes.com/where-can-i-buy-a-mackage-jacket-mackager">where can i buy a mackage jacket</a> <a href="http://www.odubmusic.com/womens-nike-free-5.0-black-anthracite-sneakerf">womens nike free 5.0 black anthracite</a> <a href="http://www.kidbleach.com/air-jordan-retro-28-orange-purple-footc">air jordan retro 28 orange purple</a> <a href="http://www.shoppula.com/nike-air-max-ultra-flyknit-womens-skox">nike air max ultra flyknit womens</a> <a href="http://www.kanpourakuen.com/bon-march%C3%A9-nike-free-5.0-v4-hommes-vert-sportsd">bon march茅 nike free 5.0 v4 hommes vert</a>
    agriind http://www.agriind.com/

  9. avatar 呜炀裆

    感谢博主!

欢迎留言




用户登录

sitemap