Android : Get Battery Current Values Forthe Android Phone

Mar 13, 2010

I am trying to collect power usage statistics for the Android G1 Phone. I am interested in knowing the values of Voltage and Current, and then able to collect statistics as reported in this PDF.

I am able to get the value of Battery voltage through registering for an intent receiver to receive the Broadcast for ACTION_BATTERY_CHANGED. But the problem is that Android does not expose the value of current through this SDK interface.

One way I tried is via sysfs interface, where I can view the battery current value from adb shell, using the following command

$cat /sys/class/power_supply/battery/batt_current
449

But that too works only if the phone is connected via USB interface. If I disconnect the phone, I see the value of batt_current as '0'. I am not sure why the value of current reported is zero. It should be more than zero, right?

Any suggestion / pointers for getting battery current value?

Android : Get battery current values forthe Android Phone


Android : Update Values Of Other Activity In Current One?

Oct 19, 2010

I have an application which has 2 screens. When a value is changed in the second screen and when the first screen is called, the value must be updated on the button of first screen.

But I am not able to update the value on any of the widget of first screen. But I am able to see that I am getting the value, But when it comes to updating the same on button it does not happen.

View 4 Replies View Related

Android :: Why Preferences Page Not Show Current Values?

Sep 16, 2010

I have a preferences page which is defined by XML - including some default values. I use a PreferenceActivity to display and handle this page. Whenever I use this page to set the preferences the preference file on the file system is updated properly - I can see this via adb. However, whenever I go back to the settings page after have changed some of the settings, it's the defaults that are shown. Worse than that, if I press back without changing any settings, it then sets the, all back to the default. How I can get the prefs to actually show the current settings? My PreferenceActivityis created thus:

@Override protected void onCreate(Bundle savedInstanceState) {
PreferenceManager.getDefaultSharedPreferences(this) .registerOnSharedPreferenceChangeListener(this);
setDefaults(this); super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); }

The XML looks like this:
<?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference android:id="@+id/numberOfYearsList"
android:key="numberOfYears" android:title="Number of Years to Read the Bible"
android:summary="How many years would you like to take to read through the reading plan?"
android:entries="@array/numberOfYears" android:entryValues="@array/numberOfYears"
android:dialogTitle="How Many Years?" android:defaultValue="1" />
<CheckBoxPreference android:key="ignoreDates" android:id="@+id/ignoreDatesCheckbox"
android:title="Ignore Dates" android:summary="Would you like to use the dates in the plan?"
android:defaultValue="false" /> </PreferenceScreen>

View 1 Replies View Related

Android : Can I Use Current SharedPreferences Tag To Store Values From PreferenceActivity?

Aug 5, 2010

Currently, I'm using the following code across all of my activities in my app to store application level variables and carry values between activities..

prefs = this.getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);

I didn't have a PreferenceActivity prior to this, but now I do and I am looking to store a few user prefs from this new PreferenceActivity in the same sharedPreferences tag, "MyPrefs".

I know I can access the PreferenceActivity SharedPrefs from my activities via

prefs = PreferenceManager.getDefaultSharedPreferences(this);

but I would like those values saved to my current sharedPreferences tag, "MyPrefs", but I'm not sure how to do this.

View 1 Replies View Related

Android :: Possible Duration Of Idle Time Of Phone Based On Current Battery Level

Aug 18, 2010

I am new to the android programming environment. I am currently working on a project which deals with the user's phone battery level.I am showing the current battery level left on the phone.now i want to display the amount of duration of "idle time, talk time, video playback, audio playback and web surfing" that can be done based on the current battery level. What kind of approach shall i follow.(or) What available API shall i use to get those.

View 2 Replies View Related

Android :: How To Get Current Battery Level Of Device?

Feb 18, 2009

Is there a way to get the current battery status of the device (battery level and if the battery is currently charging). The only way I found so far is by using a Broadcast receiver to "listen" for battery status changes. Is there a way to get the battery status using a direct API call? I my case, I would like to check if the battery has sufficient charge (or is being currently charged) before starting the download of some (potentially large) files.

View 2 Replies View Related

Samsung Behold 2 :: Meter Reporting Values / Battery Life?

Jan 1, 2010

So i am working on the m900 battery issue right now and we know exactly what is wrong with the meter reporting values (samsung set 15% to = 3.74V while the nominal voltage is 3.7 so it reports 15% when it is really more like 60-40% somewhere in that region).Does the behold 2 suffer from this same problem or is there really a battery life from full charge to phone wont turn on?If you dont have this issue, and have access to the open source files for it please let me know.. i need the battery.c and .h since these phones use the same battery

View 4 Replies View Related

General :: How To Edit Default Values Of Memory Min-free Values Of Rom Reside

Apr 9, 2014

I want to ask where does the defaults values of memory min-free values of a Rom reside? I mean what file I would have to edit to edit those values?

View 1 Replies View Related

Android :: Blocking Current Activity / Screen Till Current Task Is Complete

May 13, 2010

The default behavior of an activity when BACK softkey is pressed is, GO BACK TO PREVIOUS ACTIVITY. If some the same activity is waiting for some response from server or some data updation is going on and then press BACK, I want to wait on the same screen till the current task is completely processed and then move out to the previous activity.

You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options

View 12 Replies View Related

General :: Note 3 On Stock 4.4.2 - Why Battery Charge Current Not Detected

May 11, 2014

I'm using a Note 3 on stock 4.4.2, rooted. tried different battery reading apps (e.g. CurrentWidget) but it always gives me 0mA when charging.

This is unlike my previous S4, where it can give me the precise readings (but of course not as accurate as a real multimeter).

View 5 Replies View Related

Samsung Moment :: Any Application To Show Battery Current Drain / Charge?

Dec 3, 2009

I have been searching and just can't find a way to show the amount of current draw/charge on the battery (in milliamp hours). On windows mobile we could see this and in light of the Moment's battery issues it would be a great way to see what is really going on.

View 9 Replies View Related

Android :: Get Current Location Of The Phone

Jul 26, 2010

How do I get the current location of the phone? I'm not talking about registering for location updates on the location manager and waiting for it to update upon change. I'm talking about get the current position.

View 4 Replies View Related

Android :: How To Launch Another Phone App From Current App?

Mar 8, 2010

I have developed 2 android applications and what i want is a way to launch my android application no2 from say my android application no 1 can anyone plz guide me with this. And tell me the extact intent i need to fire.

View 2 Replies View Related

Android :: Get Current GEO Coordinates In Phone?

Jul 16, 2010

How to get GEO Coordinates ( latitude & longitude ) without using GPS in android ?
Any Suggestion ?

View 1 Replies View Related

Android :: Need Email Of Current User Of Phone

Mar 19, 2010

Is there a way to find the email address of the user of the phone? I have a software that requires password. However, sometimes people forget their password and want a reset. I think the best is to send an email to the user of the phone, instead of prompting the email address at the time the forget their password. Because who knows, it could be one of their friends that picks up the phone and likes to reset the password as a prank.

View 2 Replies View Related

Android :: Create An App For Getting Current Location Of Phone?

Sep 23, 2010

Please Help me for creating an application for getting the current location of the android phone.

View 2 Replies View Related

Android :: Phone Won't Save Current State Of An Activity / Way To Do

Nov 17, 2010

I am trying to save some values in the onSaveInstanceState(Bundle) method of my activty by following the example here: How do I save an Android application's state?

But it doesnt seem to load it from the Oncreate(). the bundle object is always null but whenever i call another activity, it does indeed go into the onSaveInstanceState method to save my values.

Now i read that question i just posted and someone noted how they could not get it to work in an emulator? unfortunately that is all im working on. On an emulator and cant test the app on the device as i have no device available to me right now And the web services i am interacting with are in a local VM on my work machine that cannot be accesses remotely at the moment.

My question is, is it true that saved bundles dont work on emulators? I also noticed how when i do dismiss or bring up a new activity , the activity calles onPause and then onStop. when i bring back the same activty, it goes straight to onCreate?

now according to the docs here http://developer.android.com/guide/topics/fundamentals.html#actlife That is correct in terms of what the lifecycle diagram shows but if you read below that diagram on the onStop() section it says the next step it goes into is either onRestart() or onDestroy()? no mention of onCreate? Type on the docs?

Anyways here is my onSaveInstanceState() and onCreate() both in the same activity: code...

View 1 Replies View Related

Android :: Current Address Using Latitude And Longitude / Phone Number In Droid App?

May 6, 2010

I want to find the current Address using current latitude and current longitude or phone number in android application.

View 2 Replies View Related

HTC Incredible :: Phone No Longer Knows Its Current Location

Sep 24, 2010

The clock/weather widget seems to no longer know my current location. All it says is literally "Current location". Prior to the 2.2 upgrade and even for a while after the upgrade it used to show the actual city or town I was in. I've played around with the settings under Settings -> Location but nothing makes a difference.

View 2 Replies View Related

HTC EVO 4G :: Current Username In Phone Identity Settings Is Way Different

Sep 10, 2010

I am just curious how when i go to settings to look at my phone identity, my username is my email address along with a bunch of numbers attached to it.

so it shows "mynamex98765321098765@sprintpcs.com" I saw that someone elses evo shows that persons @sprintpcs.com minus the numbers. I cant ask the person cause hes not around anymore.

How would i change my email to leave off those numbers?

View 2 Replies View Related

HTC EVO 4G :: Rooting Erase My Current Phone Settings?

Jul 26, 2010

I want to root my EVO just to uninstall sprint apps and get free wifi tethering. I don�t want to flash any roms. My phone is updated to the 1.47 software version. I have a few questions regarding this process�

1.)Will my phone be completely erased after this root? Because I installed a lot of apps and don�t wanna go through that process again..

2.) can anyone care to help me with this process? Like make it simple for me to understand?

View 3 Replies View Related

HTC Incredible :: App To Backup Current Configuration On Phone?

May 6, 2010

I am nw to this android thing, How do you backup the current configuration on the Incredible phone? Is there an application to do this or is there some built in way. I do not mean backup assistant!

View 1 Replies View Related

HTC EVO 4G :: Phone Not Recognize Current Picasa Enabled Google Account

Nov 22, 2010

I just created a picasa account, and now when i try to upload photos on my EVO it tells me to either log in with a google account or make a new one. It will not recognize that my current google account not has picasa enabled. How in the world can I get it to recognize this? I don't want to do a hard reboot because I'm rooted and have been having alot of problems getting a ROM installed.

View 3 Replies View Related

General :: Battery Meter Bug During Charge Makes Phone Think Battery Is Dead

Nov 9, 2013

I have a sprint GNex. I just started having this problem recently (but before the 4.3 update). I plug my phone in overnight and at some point in the middle of the night an error occurs that make the phone think it is off the charger and has a fully depleted battery. The battery level icon shows no charge and if I pull the phone off the charger it immediately says it has to shut down due to a low battery. However, as soon as I turn it back on it is back to normal with a full charge.

View 1 Replies View Related

HTC Desire :: Charging Battery Frequently Spoil The Battery Or Phone?

Sep 22, 2010

HTC desire users. I often charge my phone rather frequently like once it twice a day. Sometimes I charge even when the battery is only half full as I am going out. Will this spoil the battery or phone? (If I charge when the battery have not been all used up).I heard from people that it might spoil the phone if I charge in this manner frequently.

View 13 Replies View Related

HTC Hero :: Send / Receive Mms On Phone - App To Snap A Picture Of My Current Screen?

Mar 13, 2010

I am wondering if you guys have found a way to send or receive mms on your heroes and what version of android yours is running. Mine is running 1.5 and is the round hero, not the newest one. I also cannot find a place anywhere to send mms. Also, how do I snap a picture of my current screen, or do I need an app for that?

View 10 Replies View Related

Android :: Getting Values From Array

Apr 16, 2010

I have a collection of strings and declared the strings individually as arrays using ArrayList<String> al=new ArrayList<String>(); and called the arrays in the program by using al=getIntent().getStringArrayListExtra("titles");

Now, instead of declaring each of the arrays i have created SongsArray.java like below...

public class SongsArray {
private String title;
private String movieName;
private String singerName;
private String imagePath;
private String mediaPath;

public String gettitle()
{
return title;
}
public void settitle(String title) {.................

View 1 Replies View Related

Android :: Getting Values From XML - API Level 3

Jun 24, 2010

I have a string that contains a xml structure and there are two pieces of data in separate tags that I am after.

xpath has been added since API level 8, and with me being stuck with API level 3 (old phone for you ;-)) I need a way to get the data.

Would using a regular expression commit a huge sin? ;-) The xml isn't that big...

View 1 Replies View Related

Android :: How To Get Custom Xml Values

Nov 17, 2010

I want to get the number of launcher:cellWidth in xml:

CODE:.........

I know that I can get it in a Custom view by:

CODE:....................

But how Can I get it in a Activity? not a Custom view.

View 1 Replies View Related

Android : Way To Add Values From Database?

Jul 26, 2010

One of the Preferences in my PreferenceActivity needs to get its values from a database. How do I add these values?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved