<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックHow to make Android battery icon keep updated with the current battery level</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-Android-battery-icon-keep-updated-with-the-current/m-p/351734#M48920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Our project is a customized Android tablet, developed based on i.MX6 Sololite EVK with&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; IMX6_JB43_110_ANDROID_SOURCE_BSP, the battery gauge is STC3115 and the driver porting is successful, working w/o problem. When the power cord plugging into the micro-USB port, we can see the battery icon became charging icon with a "flash" sign, however, the battery level won't change until we unplug the power cord, or plug the &lt;SPAN style="color: #000000;"&gt;power cord again then we can see the updated battery level.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have studying and understand we might need to implement a program like: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;private&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;final&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;BroadcastReceiver&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mBatteryInfoReceiver &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;BroadcastReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(){&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;@Override&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onReceive&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Context&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arg0&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Intent&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; rawLevel &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"level"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; scale &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"scale"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; status &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"status"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #868686;"&gt;// Do something&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;};&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onCreate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; registerReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;this&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;mBatteryInfoReceiver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;IntentFilter&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;ACTION_BATTERY_CHANGED&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;));&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onDestroy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; unregisterReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;this&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;mBatteryInfoReceiver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But we think there should be an existing mechanism in the BSP since this is a general requirement for the Android tablets. We have reviewed BatterManager.java, BatteryService.java and BatteryController.java in BSP, and developer.Android.com (&lt;A href="http://developer.android.com/training/monitoring-device-state/battery-monitoring.html" title="http://developer.android.com/training/monitoring-device-state/battery-monitoring.html"&gt;Monitoring the Battery Level and Charging State | Android Developers&lt;/A&gt;) but still got no clear idea on how to make the Android battery icon in the status bar always reflecting the correct battery capacity level, either in charging and not-charging status. We understand it's might impact the battery life if we regularly checked the battery status but we just hope the battery icon can be updated per 5 or 10 mins.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please advise if you have the solution, any suggestion/comment are also more than welcome!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;-tftu&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 12:36:57 GMT</pubDate>
    <dc:creator>tftu</dc:creator>
    <dc:date>2015-01-16T12:36:57Z</dc:date>
    <item>
      <title>How to make Android battery icon keep updated with the current battery level</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-Android-battery-icon-keep-updated-with-the-current/m-p/351734#M48920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Our project is a customized Android tablet, developed based on i.MX6 Sololite EVK with&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; IMX6_JB43_110_ANDROID_SOURCE_BSP, the battery gauge is STC3115 and the driver porting is successful, working w/o problem. When the power cord plugging into the micro-USB port, we can see the battery icon became charging icon with a "flash" sign, however, the battery level won't change until we unplug the power cord, or plug the &lt;SPAN style="color: #000000;"&gt;power cord again then we can see the updated battery level.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have studying and understand we might need to implement a program like: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;private&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;final&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;BroadcastReceiver&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mBatteryInfoReceiver &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;BroadcastReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(){&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;@Override&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onReceive&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Context&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arg0&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Intent&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; rawLevel &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"level"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; scale &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"scale"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; status &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;getIntExtra&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"status"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #868686;"&gt;// Do something&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;};&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onCreate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; registerReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;this&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;mBatteryInfoReceiver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;IntentFilter&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;Intent&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;ACTION_BATTERY_CHANGED&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;));&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;public&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;void&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; onDestroy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; unregisterReceiver&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;this&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;mBatteryInfoReceiver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But we think there should be an existing mechanism in the BSP since this is a general requirement for the Android tablets. We have reviewed BatterManager.java, BatteryService.java and BatteryController.java in BSP, and developer.Android.com (&lt;A href="http://developer.android.com/training/monitoring-device-state/battery-monitoring.html" title="http://developer.android.com/training/monitoring-device-state/battery-monitoring.html"&gt;Monitoring the Battery Level and Charging State | Android Developers&lt;/A&gt;) but still got no clear idea on how to make the Android battery icon in the status bar always reflecting the correct battery capacity level, either in charging and not-charging status. We understand it's might impact the battery life if we regularly checked the battery status but we just hope the battery icon can be updated per 5 or 10 mins.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please advise if you have the solution, any suggestion/comment are also more than welcome!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;-tftu&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 12:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-Android-battery-icon-keep-updated-with-the-current/m-p/351734#M48920</guid>
      <dc:creator>tftu</dc:creator>
      <dc:date>2015-01-16T12:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Android battery icon keep updated with the current battery level</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-make-Android-battery-icon-keep-updated-with-the-current/m-p/351735#M48921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please take a look at the following thread, it might help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/442854"&gt;need help with android fuel gauge&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 18:39:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-make-Android-battery-icon-keep-updated-with-the-current/m-p/351735#M48921</guid>
      <dc:creator>SergioSolis</dc:creator>
      <dc:date>2015-02-19T18:39:58Z</dc:date>
    </item>
  </channel>
</rss>

