I was just reading about the Motorola Xoom tablet. It runs a new version of Android intended specifically for larger screen devices rather than mobile phones and it looks pretty cool in the bits I’ve seen.
As much as I want to buy one of these things I’m afraid that I’m not going to. Why? I own a Motorola Milestone.
My Milestone was advertised as Flash Ready™ when I bought it many months ago. Sadly Motorola still haven’t managed to get Android 2.2 on it, so I can’t actually view any Flash content at all. It’s not that I really care about Flash, but more the fact that Motorola lied to me. They lied to owners of some of their other Android phones too. Some people are stuck on Android 1.6 forever even though their phone is only a year old. It’s just not in the spirit of Android, as far as I’m concerned.
I will be patiently waiting for HTC or Google to release a tablet before I consider buying one.
I bet I’m not the only Motorola customer who won’t be buying anything else from them ever again.
At work we have a section where people can set up emails that go out to their own customers (we have a reseller scheme). There are placeholders like [NAME] and [BASKET] that the customers can put in their email templates which we then replace with the actual information when we send the emails out.
Recently I’ve been asked to add some IDs and classes to the HTML elements we generate for the placeholders so that the whole section can be styled by our resellers.
I quickly added a bunch of classes and then began testing with a <style> tag in in my email. I spent quite a while wondering why it wasn’t working correctly before the DOM Inspector showed me that Google strips the IDs of elements. I then went on to read that they also remove all <style> content. You also can’t use a <link> tag to include a stylesheet (which is a good thing).
The only way to style email for Gmail is apparently to use the style attribute for each element. This is fine if you are fully writing the emails yourself, but our resellers never even see the actual tags, they just put in a placeholder. That leaves them no way of adding a style attribute to a section, which means we can’t let our resellers fully style their emails. Ridiculous.
To begin developing my game I downloaded the latest Android SDK and set up Eclipse as explained in great (and hopefully up-to-date) detail on Google’s instructions page.
Once this was working I got the latest version of the Rokon game engine and extracted it into my workspace folder. I imported the existing project into Eclipse and added my own class to the list. I copied one of the examples into my own class and then removed the com.rokon.examples class and files. I changed all references of the com.rokon.examples class to my own class in files like the AndroidManifest.xml file. I missed a few places at first, but Eclipse is pretty good at telling you what’s wrong. I found it helpful to clean the project using the Project->Clean menu item to make sure no errors were left over from before certain changes.
Once I had eradicated all errors from Eclipse I ran the source in an Android Virtual Device. To my immense surprise it was working!
I went into the code and started to strip out all the bits I didn’t want. I kept one sprite around, but changed the sprite texture to my own arrow, and made it considerably smaller.
That was all pretty easy, and I thought things were going to well until I realised that I now needed to get down to the harder stuff. The user would need to aim in different directions from one point, so I needed a way for the person to change the angle. My first thought was to use the scroll ball that appears on most HTC devices these days. I thought that might be a bit of a problem though, because I was planning on using the scroll ball press as the trigger, and that might lead to people accidentally pressing it when they didn’t want to.
I decided that it would be cool to have the character point towards where the user pressed on the screen. The problem with that is that code is required to work out what angle to rotate the character by depending on where the character is, and where the player has pressed on the screen. I managed to find various little bits and pieces online that helped me come up with a decent solution.
That looks very complicated, but it’s not that bad, really. The angle is worked out using the position of the centre of the sprite and the position of the press on the screen. I’d explain it in more detail, but that might take a while. You may notice the +90 near the end of the rotation line. Unfortunately that’s a bit of a hack to add 90 degrees of rotation to whatever angle is given to me. It works, so I’m fine with that for now.
Now when I run the “game” I see an arrow on the screen. If I press on the screen then the arrow points at where I pressed. If I move my finger while it’s pressed then the arrow follows my finger around. A good start to coding the actual character.
A month ago I wanted to set something on TV to record from my phone because I was out of the house. I was aware of the Remote Record option available on the Sky website, and that I could send an SMS to a specific number to set it up, but the website is a real pain to use on my phone, and I couldn’t remember the phone number, or what to send to it anyway.
I figured there was probably an Android application for sending a remote record request via the web, and there actually was. I was very pleased, until I saw that is cost quite a bit of money. This was when I came up with the idea of writing my own Remote Recorder application.
After a lot of my evenings and weekends spent on it I finally have a working application that I’m satisfied with enough to release to the general public.
Search the Android App Store for “Remote Recorder” and give it a go!
Remote Recorder has a very basic interface. You enter the name of the show you want to record into the search box and results are returned for you to choose from. Once you’ve chosen a show a list of show times and channels is retrieved and displayed to you. If you long-click on the show description then a remote record request is sent to Sky and they forward it to your Sky+ or Sky+ HD box. Hey presto, your show gets recorded. 🙂