FREE REGISTRATION LINK "http://makemoney.usersboard.com" WHICH FORUM ALLOWED EXTERNAL LINK

by xomba.bd » Thu, 22 Apr 2010 00:36:12 GMT


Sponsored Links
 FREE REGISTRATION LINK " http://makemoney.usersboard.com " WHICH FORUM
ALLOWED EXTERNAL LINK



FREE REGISTRATION LINK


 http://makemoney.usersboard.com/profile.forum?mode=register 

--



Other Threads

1. Issues with Listener, "back" button, and onDestroy().



If you are talking about registering some listener with Android
(LocationListener, etc.), then no. Please unregister your listeners.


singleInstance != singleton.

Let's walk through this, starting with a freshly-rebooted phone. At this
point, there are zero instances of your activity.

1. User taps on your icon in the Launcher. Android starts up an instance
of your Activity. At this point, there is one instance of your activity
in the system.

2. You register a LocationListener. At this point, there is one instance
of your activity in the system.

3. User presses BACK, and you fail to unregister the LocationListener.
At this point, from the standpoint of singleInstance, there are zero
instances of your activity in the system. However, from a garbage
collection standpoint, there is one instance of your activity in RAM,
since Android holds onto your LocationListener, which holds onto your
activity.

4. User taps on your icon in the Launcher. Android thinks there are zero
instances of your activity in the system (from a singleInstance
perspective), and so starts up an instance of your Activity. At this
point, there are two instances of your Activity in RAM -- the old one
and the new one.

It is unclear to me what you think you need singleInstance for -- most
single-activity applications do not need singleInstance. So, I would get
rid of that, plus clean up your listeners.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 2.0 Programming Books: http://commonsware.com/books

-- 

2. Getting the battery current and voltage values for the Android Phone

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 here
http://dl.google.com/io/2009/pres/W_0300_CodingforLife-BatteryLifeThatIs.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? Also
please correct me if I am wrong.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

3. How to?

4. any plans to enable systemtap?

5. does Android has support for SDP3430 board

6. Append Text To Start Of TextView

7. Ada yg mau barengan pre order Micro SD 32Gb?