Thursday, May 07, 2009

Android Widget Crazyness

Since my last post I've been Widget'ing away like a good dev, check the Mippin Blog for details of our 'Tech Buzz Widget'

I also wanted to launch a personal widget project as well, so I took a long hard think about what Widgets people really really need and came up with.... wait for it... yes you guessed it... a Battery Widget, doh! Well there wasn't one, so I thought I'd be first at least.

The first incarnation wasn't quite so pretty, but I've got it looking quite nice now. A little 24bit alpha blended glow around the widget helps it blend into any wallpaper. There is also a little charging indicator for the sake of completeness.

If you touch the widget it shows quick links to the Display, Wifi and GPS settings pages. Really this should be replaced with embedded toggles switches to turn GPS/Wifi/Bluetooth/Radio on and off as well as a brightness slider, hopefully I'll get time for that later.

Developing home screen widgets on Android is really enjoyable, so if you have any widget ideas, I may well take you up on them.

By the way, if you are wondering how strong the demand for Widgets on Andorid is right now, the Battery Widget hit 3000 downloads in the first 5 days.


Terence Eden said...

A "brightness" widget would be top of my list. I keep the brightness at zero for day to day use - helps conserve the battery.

But when I'm showing off the phone, doing a demo, or need to find my way in a darkened room, it's good to have the brightness at maximum.

Hmmm.... I'm not doing anything this Sunday... Might be time to break out the SDK!

Unknown said...

Terence, I agree. I started work on a brightness slider for the battery widgets settings screen. But in 1.5/Cupcake the brightness api stuff has changed, damn them. I will continue to work on it soon.

MCDent said...

Wowee, 2 people I follow from twitter land here, one whom is famous and has been on the BBC Click, and another who is a famous android developer and whos battery widget I use :)

Yes some kind of nice easy, quick to use brightness slider widget would be useful. I guess I will be dedicating at least one of my 'screens' to widgets soon!

Thanks guys.

Unknown said...

Hey Mike, I follow you as well, always see your 4 coloured faces icon flash by in twhirl.

ok so number 1 priority is to get a brightness slider going in firmware 1.5

number 2 priority is to hack Android home screen to get more than 3 screens, maybe 5 or 7, while still using the default launcher. I'm running out of widget spaces quickly.

Jiri said...


I love your Bat widget! It is very useful app which encouraged me to write my first widget (RSS reader)!

I'm a beginner in the Android development so I don't know how to create a onClickListener for the widget. Please, could you give me an advice how to show an other activity (e.g. Dialog) when I tap on the widget?


Unknown said...

Jiri, the best place to check is the Android developers blog article I referenced.

But what you need to do is when your widget receives the call to update itself, set a PendingIntent on whichever items you want to make clickable. For example

Intent defineIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(""));
PendingIntent pendingIntent = PendingIntent.getActivity(context,0 /* no requestCode */, defineIntent, 0 /* no flags */);
updateViews.setOnClickPendingIntent(, pendingIntent);

It is all in this post

James O'Malley said...

If you could code a Twitter widget that is just a text-box and "send button" that can sit on the home screen I would cry with happiness - something like the Google search box but for posting to twitter.

I spend too much time twittering.

Maff said...

I'd love a calendar widget because the one that's built into 1.5 is awful, it only displays 1 item in a massive block and it doesn't display what's on the current day, just what's coming up from tomorrow onwards!

ghostsq said...

After I installed the battery widget, the phone and acore applications starts crashing. A assume the memory runs out (I have 98Mb total). After I deleted the battery widget from the main screen, I still see the loaded in the memory (using the top utility). And it consumes 86Mb.

Unknown said...


Please let me know where I can download the battery widget.


Unknown said...

do you have an alternate address where i can download the battery app. i cant access it from the android app on my market place. i would really appreciate it. thanks.

Anonymous said...

Bonjour I'd like to congratulate you for such a terrific made site!
Was thinking this would be a nice way to make my first post!

Johnie Maverick
if you're ever bored check out my site!
[url=]halloween Party Supplies[/url].

Anonymous said...

Hi There I'd love to congratulate you for such a terrific made forum!
Was thinking this would be a perfect way to introduce myself!
We believe the only way gain revenue it is usually a smart plan to start a savings or investing strategy as early in life as possible. But don't despair if you have not began saving your assets until later on in life. With the help of hard work, that is experimenting the best investment vehicles for your assets you can slowly but surely increase your riches so that it numbers to a large amount by the time you wish to retire. Look at all of the accessible asset classes from stocks to real estate as investments for your money. A knowledgeable and diversified portfolio of investments in various asset classes will make your money grow throughout the years.

-Kelly Siemers
[url=]currency exchange rates[/url]

Android app developers said...

This is one of the awesome information.This is one of the special post.I am so happy by read about your post.

david said...

This is an amazing and interesting sharing for us. It really helped me I am glad that i visit here.

Android Application Developers