Becoming the Android geek

Well.. have been almost a year since the last post. What had change? basically Android and the mobile OS market. Nowadays we have like a zillion android gadgets in the market (phones, STB, the “nook“)… During the last year the biggest change I have seen in Android was the launch of “Droid” the Motorolla’s Android v.2.1 phone sell by Verizon. Tablets are also an evolution derived from the mobile OS market, being the new Apple’s iPad the newest kid in the block.

My last post (from last year) was about the “that’s 70s clock” application.  About 800 to 900 download the application and as today I believe some 200 are still using it. The silly thing about those 200 people using the application is that I can not count myself as one of the 200 hundred users. I stop developing the clock long time ago, basically when Android 1.6 was released and Android’s Widget started showing up with it.

My first attempt using widgets was to develop a widget for the 70’s clock, but that didn’t work. Then I wanted to create some kind of rss news reader widget. RSS is a xml feed that contains information, can be news or anything you want to share (like your twitter posts, or your published pictures in Picasa). My idea was to create a news widget with news from spanish speaking countries.

After dealing for a while with the XML parsers (there are two parsers you can use in Java… SAX and DOM), I did start dealing with the widgets itself.  The trick behind the widget more than drawing it on the screen is updating it.  Basically you create an alarm in android that triggers a service that will refresh the widget (and modify its content)… it sounds easier than what it actually is though.

The good thing about RSS is that you can find thousands of newss sources in the internet, and as they all follow the same format, you can create as many widgets as RSS sources you have. As I was thinking in spanish news what did was in one side to create a source for a particular country’s news. My first source was a portal for news from my country Venezuela. The portal is set at http://venenews.androidgeek.com. I did use Wordpress to publish the news, and a wordpress plugin that sindicates RSS (meaning it reads an RSS source and publish its content as a wordpress post). Then I use the RSS feed from wordpress to feed my widget (in this way I can generate one feed with news from several sources).

I did the same for news coming from Mexico.  I did create a news portal (http://noticiasmexico.androidgeek.com) and use it to feed a widget.

Having two news sources I did create two Widgets, one aim to people from Mexico with news from their country, and the other aim to people from Venezuela with news from Venezuela… I named the widget with news from Venezuela “Venenews”, and the one from Mexico I call it “Noticias Mexico”. .. both widgets can be found in the Android Market.

Once I have the chance, I will write about how I wrote the widget and actually talk about some problems I’m still having with them… c’ya then

Continue reading

, , , , ,

Little changes to the WW Calculator UK

Long long time without posting here…. I have been away from Android for a couple months…. As everybody knows CUPCAKE is out, and with it a few changes on the Android API came too. Parts of those changes force me to take the 70’s clock out of the market; I was using some hidden system calls that were eliminated on the new API, I will have to figure out a different way to make the application work before publish it again.

On the other hand, a couple people ask me to add two things (or a combination of things) to the WW Calculator. One was to add a decimal point to the application. Appearantly on the UK many foods use a decimal point on the Calories information and withouth the decimal point the points calculation could be wrong (one point over or above).  Another thing people ask was to stop the new virtual keyboard to pop-up on the application (some people ask to eliminate the virtual keyboard only if I add the decimal point)… In summary, I did add the decimal point and stop the virtual keyboard from popping up … I have to do the same changes to the WW calculator that use the american formula (for U.S).

Also on the UK version I did reduce the price to 1 Euro. When I did set up the application and set the price to 1.5 dollars believing that the application whould show up at the dollar equivalent price (I was assuming that 1.5 dollars where equivalent to 1 Euro), but I was wrong, on the UK market the application was price at 1.5 Euros, which was unfair for the UK customers…. (I don’t know how many dollars is a japanese Yen, but I wonder if on Japan the application shows prices at 1 Y.. which I have no idea how much it is in dollars)….

That´s it for today….

Continue reading

the FlipNumber object for the 70’s Clock

Long time since last time :-D…. But I keep working in my quest to become a Android Geek… here is what I’ve been doing lately…

First, let’s keep my story about the Android Market. After the two really bad comments about my 70’s clock, I did stop charging a buck for the application and set it free…. so far a little more than 900 people had download the application, but only one made a comment. The comment was something like “If I have to pay for this, I would ask for a refund”… ??? I understand that those who pay the buck will feel with the rights to complaint, but complaining about the supposition of paying makes no sense to me!!!! that message just confirmed me that some people just “like” to criticize other people works, no matter what!!! (even by using a supposition as a leverage)…. In any case, I haven’t extended the application too much… on my test I added a change brightness option, and a set alarm option…. what I did was to redesign the program….

Android widgets are call Views. A layout is a view, a EditText widget is a View, etc,etc. So I decided to make each number on the Flip Clock a View (an object). To begin with, I did start by decomposing each number on the clock. Each of my numbers is made by two ViewFlippers, one in top of the other, and each view flipper have 10 images. The top

Continue reading

, , , ,

That 70’s clock and the market

First I will talk about the reasons why I made this app. I come from Venezuela, a country in south America with lots of oil reserves.  In the 70’s the Venezuela’s government nationalized the oil industry and all the revenues from selling oil stay in the country. People became wealthier and started to buy more and more imported articles. Color TVs (even though there was no color tv broadcasting in the country), microwave ovens, FM radios (even though no radio station was broadcasting on FM) … basically on the 70’s Venezuela was the king on electronic gadgets imports.

Around that time is when I first saw a Flip clock at my family’s house in Caracas. I usually visit them (I was living on a different city) every summer. I remember to spend hours staring at the clock just to see the numbers flip. For some

Continue reading

, , , , ,

The android Market

Let me talk about the Android Market. I did subscribe to the market by paying $25 bucks to google. Those $25 bucks give you the rights to publish the applications you write on the Android Market. You can publish applications for free, or charge for it.

I did publish the WW calculator on the Market for $1. On the first day at least 15 people bought it. I did publish the application like at 4 or 5pm in the afternoon. By 5:30 there was already a commentary about the application. On average people rate my application with 5 stars.  On the other hand, a couple people gave me 1 star, cause they though the application was not working quite well, or was lacking of some feature.

One of the comments catch my attention and my indignation..

Continue reading

, , , , ,

That 70’s Clock

If you are nostalgic about the 70’s this is the application for you!!! That 70’s Clock is a Flip clock for you Android Phone.

As simple as the 70’s were, This simple application will fill your Android phone screen with an emulated Flip clock, just as those we use on the 70’s. Comming features include :

  • Different Skins
  • Alarm Setting
  • Emulated Radio (which actually will play the music stored in your phone)

Here is a screenshot of the application

That 70's clock screenshot

That 70's clock screenshot

A Original clock from the 70’s

Clock from the 70's

Your comments are more than welcome

Continue reading

Improving the WW Calculator

I haven’t write in a while, but I’m been working on improving my Android programming skills. I’ve been thinking in different projects, but before any new projects I wanted to improve my WW calculator.

I show my first attempt to my wife and she said the calculator in my G1 phone looks much better than the one I wrote for her blackberry, but I’m not still satisfied at all. I did realize that opening the keyboard to input the values was kind of tedious, thus I wanted to add a numpad on the screen. It is more practical and faster  for the user to take the phone, start the application and touch the screen to input values than using the keyboard. To make my dream come true, I took as inspiration the dialer numpad. Now how can I implement it?

First, I downloaded the Android source code to see how the dialer numpad works. I follow the instructions from the Android developers page and I download the cupcake source. Cupcake is the comming soon new version of the Android O.S.

In any case, there are a few things I learn by looking at the application’s source code. One, when you use a resource (in my case a ImageButton) instead of using an image for the background I can use .xml file tailored in a way that will show and image when the button is pressed and an image when the button is released. In that way, the button will turn orange when pressed and black when is release. Here is a code snippet of how that works.

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@drawable/btn_dial_pres
sed" />
    <item android:drawable="@drawable/btn_dial_normal" />
</selector>

Also, in my first attempt if each field on the calculator were not populated, by pressing the “CALC” button the application will crash. I did fix this by checking the values and showing a error message using a toast.

I was playing with this on-screen numpad for a while, and the way I did implemented don’t know if it is the best, but is working for me. First, each number is a non-focusable ImageButton, and each ImageButton have a propertie named “tag” that allows you to assign a value to each ImageButton. In my case to the button representing the number one and add the tag “1″, the same for the other buttons.

What I wanted to do was to implement some kind of listener that reacts each time the screen is touch, but I did not find an easy way to do it, so what I did was to implement a OnKey listener for each button (actually my java class implemented a OnKeyListener that works for all the Buttons). On the key listener by default I assume that a number was pressed, I get the tag out of the Button (the tag is equal to the value represented by the button) and attach the text to the field that have the focus at that moment. Works pretty well for me.

here is the code that edits the fields

switch (v.getId()) {
    default: 
        if (calorias.hasFocus()) calorias.append((CharSequence) v.getTag());
        else
        if (grasa.hasFocus()) grasa.append((CharSequence) v.getTag());
        else
        if (fibra.hasFocus()) fibra.append((CharSequence) v.getTag());
        break;

I will give it a try and put my application on the Android Market and see how it goes… I’ll let you people know

C’ya

Continue reading

, , , , , ,

Weight Watchers, My Wife and Me

My wife is doing the Weight Watchers Diet. For those who don’t know what the WW diet is, let me explain. On the WW diet you assign points to food and you shouldn’t eat more than your assigned daily points quota. The daily quota is calculated based on your weight. The tricky part is how to calculate how many points each food have.  There is (of course) a formula to get how many points a food have. the formula requires three inputs from the food’s nutritional table, Calories, Fat and Fiber grams.

For some weird reason, my wife thinks that I have a database with all the foods and its points value, cause she always ask me how many points this or that have.  To stop the pain I decided that my first Android application (the first one

Continue reading

, , , , , , , ,

New Android SDK 1.1

Google just release an update to the Android’s SDK. Apparently there are not too many changes, and If you made your application using SDK 1.0, they recommend to re-compile your application with the new SDK just to be sure that the application will keep running on phones with a new firmware (which I received yesterday [02/10/2009]on my G1 phone ).

I’m leaving a link to the announcement made on the Android’s developers blog

Continue reading

,

Why?

I’ve been working with computers since I was 15…. On my xmas tree I was expecting a Sinclair ZX-81 instead of a bike, I loved War Games, Star Wars, The Matrix, Short Circuit,Alien,Bladerunner,TRON….. I rather spend my weekend learning BASIC than steeling the car from my mom, at first I loved Microsoft now I hate it! I got a computer’s science degree at school and nowadays I make my living working with technology. I don’t think Bill Gates is the antichrist.. but should be his cousin…  Does that make me a Geek??? wait, wait… there’s no need to rush, I don’t want your answer yet!!! (please!)…

Despite my geeky background, phones have never been a biggy for me… I always had the oldest phone, the one that

Continue reading

, , , , , , , ,