How to make a widget that doesn't drain the battery and updates often

by Mark Murphy » Sat, 05 Jun 2010 23:16:06 GMT

Sponsored Links

Please consider making that configurable and able to be disabled, as an
improvement over the brain-dead stock news-and-weather widget.

That depends on who is holding any partial WakeLocks. Generally, the CPU
shuts off shortly after the screen turns off.

Frankly, I don't know why the Genie... service sticks around for the
stock News and Weather. It does not appear to be affecting the
thoroughly irritating and non-configurable
change-the-headline-every-five-seconds feature, as that persists even
when I shut down the service via the Settings application.

Conceivably. That application is not open source at this time.

Probably not.

If you are using a WakeLock, double-check to confirm you are releasing
it properly.

Then, use this command to see if anyone else is screwing up *their*

adb shell dumpsys power

and perhaps:

adb shell dumpsys batteryinfo

to see who is messing up.

Mark Murphy (a Commons Guy)  |  | 

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.5 Available!


How to make a widget that doesn't drain the battery and updates often

by Kostya Vasilyev » Sat, 05 Jun 2010 23:25:56 GMT

 05.06.2010 15:14, Chister Nordvik :
So is this really the best solution to have a service running in the background? So if someone downloads 10 different news widgets from different companies they end up with a list of 10 services in the "Running services" list?
If this is the case, the user will have to choose which one to keep - so you have your chance here :) -- Kostya Vasilev -- WiFi Manager + pretty widget -- --

Sponsored Links

Other Threads

1. include xml argument

i have some layout xml that looks like this:

== file1.xml ==
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ...>

I want to include that in some other layout xml, so I do this --

== file2.xml ==
<include layout="@layout/file1.xml"/>

The question I have is how to pass arguments (and refer to them) from
file2.xml to file1.xml.

So, for example:

== file1.xml ==
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ...>
  <TextView android:text="@text" android:layout_width="fill_parent"

== file2.xml ==
<include layout="@layout/file1.xml" text="abc"/>

is this possible?


2. Two applications, same package. How?

What I am trying to do is install two applications, packaged from the
same code, but with different names and different strings.xml files.

I created the two apk files, however, when trying to install the
second application, it fails because it says it's already installed.
guess is because of the package attribute in the manifest.

I modified the manifest with a different package name, but R is
generated based on that package name and that affects the rest of the

So, my question is this: What's the process I should be using to
install two applications using the same code, but with different names
and different strings.xml files?

3. getApplitcationContext() vs this vs ActivityClassName.this

4. JOIN Contacts.People and Contacts.People.Phones

5. getApplitcationContext() vs this vs ActivityClassName.this

6. Getting the contents of android.R.attr.listPreferredItemHeight (& other dimensional system resources?)

7. What permissions (if any) are needed for ...