[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-26 Thread Paul Turchenko

Dude, they do not expose all battery values to you. They have service
written in C that reads this battery values and sends them back to
actual BatteryStatsService. Try reading linux' virtual system to get
values you want.

On Oct 26, 7:26 am, SagarH  wrote:
> While continuing on my research:
>
> I am currently stuck at trying  to find out which class actually
> modifies the values of android.os.BatteryManager (BatteryManager.java)
>
> Any ideas ?
>
> -Sagar Hatekar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-25 Thread SagarH

While continuing on my research:

I am currently stuck at trying  to find out which class actually
modifies the values of android.os.BatteryManager (BatteryManager.java)

Any ideas ?


-Sagar Hatekar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-06 Thread SagarH

Mark!!
Thanks a ton!!

I found the souce code, built it and just saw the
BatteryStatsService.java in which the comment reads "All information
we are collecting about things that can happen that impact
 * battery life." - exactly what I was looking for.

Thanks once again.

Now, my actual development work starts!


Sagar Hatekar

On Oct 5, 4:52 pm, "Mark Murphy"  wrote:
> > I searched the entire API... couldn't find BatteryStats.
>
> It's not in the API. It is in the source code. This is why you cannot
> access it from the API, as I have pointed out.
>
> > Also, when I run the emulator, I went to Settings ->About Phone-
> >>Battery Usage
>
> > That's exactly what I was looking for but sadly it comes with the OS.
> > Any idea where could I get help to reach that application? I suppose,
> > this IS the official Android forum. So, I hope to get some help from
> > the people who built that application.
>
> You will find this stuff in the source code.http://source.android.com, or
> Google Code Search.
>
> You may not find the authors of that application on this list, though.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-05 Thread Mark Murphy

> I searched the entire API... couldn't find BatteryStats.

It's not in the API. It is in the source code. This is why you cannot
access it from the API, as I have pointed out.

> Also, when I run the emulator, I went to Settings ->About Phone-
>>Battery Usage
>
> That's exactly what I was looking for but sadly it comes with the OS.
> Any idea where could I get help to reach that application? I suppose,
> this IS the official Android forum. So, I hope to get some help from
> the people who built that application.

You will find this stuff in the source code. http://source.android.com, or
Google Code Search.

You may not find the authors of that application on this list, though.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-05 Thread SagarH

I searched the entire API... couldn't find BatteryStats.

Also, when I run the emulator, I went to Settings ->About Phone-
>Battery Usage

That's exactly what I was looking for but sadly it comes with the OS.
Any idea where could I get help to reach that application? I suppose,
this IS the official Android forum. So, I hope to get some help from
the people who built that application.


Sagar Hatekar

On Oct 4, 11:54 am, "Mark Murphy"  wrote:
> > Okay :(
> > Any idea if how it shows the information. I was working on writing a
> > similar application even before SDK 1.6 came out.
>
> > API would have made my job easier. If there is no API, I would have to
> > dig 1 layer deep and access the linux kernel which can show the
> > processor info based on each Process ID. The tough part would be
> > travelling to the kernel and back.
>
> > Any insight ?
>
> I rummaged through Google Code Search to try to answer your questions. I
> do not keep the tabs open indefinitely. BatteryStats as a class name comes
> to mind.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-04 Thread Mark Murphy


>
> Okay :(
> Any idea if how it shows the information. I was working on writing a
> similar application even before SDK 1.6 came out.
>
> API would have made my job easier. If there is no API, I would have to
> dig 1 layer deep and access the linux kernel which can show the
> processor info based on each Process ID. The tough part would be
> travelling to the kernel and back.
>
> Any insight ?

I rummaged through Google Code Search to try to answer your questions. I
do not keep the tabs open indefinitely. BatteryStats as a class name comes
to mind.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-04 Thread SagarH

Okay :(
Any idea if how it shows the information. I was working on writing a
similar application even before SDK 1.6 came out.

API would have made my job easier. If there is no API, I would have to
dig 1 layer deep and access the linux kernel which can show the
processor info based on each Process ID. The tough part would be
travelling to the kernel and back.

Any insight ?


Sagar Hatekar
Comp. Sci. Graduate Student
SUNY Binghamton


On Oct 4, 11:18 am, "Mark Murphy"  wrote:
> > Is that an application
> > that's offered by default on the handset or it's an App.
>
> It is part of the operating system.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-04 Thread Mark Murphy

> Is that an application
> that's offered by default on the handset or it's an App.

It is part of the operating system.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-04 Thread SagarH

Mark:
Exactly, I meant the Battery Usage Indicator. Is that an application
that's offered by default on the handset or it's an App. If it's an
App, it should have an API. I am doing an academic project and I am
really interested in getting in to the API for this. I am working on a
Polyglot-based project (compilers to extend java and java-based
languages). So, once I get an API for this, I would be extending it to
optimize the battery usage.


Thanks.

Sagar Hatekar
Comp. Sci. Graduate Student
SUNY Binghamton


On Oct 4, 8:37 am, "Mark Murphy"  wrote:
> > The features for the SDK 1.6 lists an application-wise battery status.
>
> No, the features for Android 1.6 lists a "Battery Usage Indicator"
> application:
>
> http://developer.android.com/sdk/android-1.6-highlights.html
>
> > That's what I need an API for.
>
> That information does not appear to be available via a public API.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-04 Thread Mark Murphy

> The features for the SDK 1.6 lists an application-wise battery status.

No, the features for Android 1.6 lists a "Battery Usage Indicator"
application:

http://developer.android.com/sdk/android-1.6-highlights.html

> That's what I need an API for.

That information does not appear to be available via a public API.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-10-03 Thread SagarH

Balwinder:

Yup, I meant the Android SDK 1.6.

The features for the SDK 1.6 lists an application-wise battery status.
That's what I need an API for.

Sagar Hatekar
Graduate Student
SUNY Binghamton

On Sep 23, 4:10 pm, "Balwinder Kaur (T-Mobile USA)"  wrote:
> I assume you mean Android SDK 1.6, not JDK 1.6.
>
> Thanks for sharing the information and you can check out a
> presentation made at Google I/O this year on Battery 
> Lifehttp://code.google.com/events/io/sessions/CodingLifeBatteryLife.html
>
> Balwinder Kaur
> Open Source Development Center
> ·T· · ·Mobile· stick together
>
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 22, 2:50 pm, SagarH  wrote:
>
>
>
> > I am getting started with Android.
> > The JDK1.6 features highlights a new addition - Battery Usage
> > Indicator - which gives a breakdown of how much battery is being
> > consumed by each application.
>
> > I found that the os.battery returns the battery status (charging,
> > full, via USB, etc).
>
> > Sagar Hatekar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Battery Usage Indicator API - JDK 1.6

2009-09-23 Thread Balwinder Kaur (T-Mobile USA)

I assume you mean Android SDK 1.6, not JDK 1.6.

Thanks for sharing the information and you can check out a
presentation made at Google I/O this year on Battery Life
http://code.google.com/events/io/sessions/CodingLifeBatteryLife.html

Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 22, 2:50 pm, SagarH  wrote:
> I am getting started with Android.
> The JDK1.6 features highlights a new addition - Battery Usage
> Indicator - which gives a breakdown of how much battery is being
> consumed by each application.
>
> I found that the os.battery returns the battery status (charging,
> full, via USB, etc).
>
> Sagar Hatekar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---