Moving From iOS to Android – Temporarily..?

I’ve been using an iPhone since the 3G [so about 5 years], right up to my 4S’ encounter with the washing machine. While there are many opinion pieces out there comparing the two ecosystems – just like pictures of cats – there’s always room for one more. I’m sure there are plenty of people looking at yesterday’s announcement from Apple and wondering where they are going next.

The point of no return for my moving to Android was the drop in price of the Nexus 4 to £159 a few weeks back. It is an absolute bargain for a phone that most benchmarks – I looked at GeekBench – put on a par with the iPhone 5. The additional real estate on the screen is a joy, and one which I think would be the single toughest aspect of a move back to the iPhone. The battery life is hard to compare with a handset that was nearly two years old and because of adapting usage patterns [more on this later], but it’s certainly very good. It’s only paranoia that has stopped me from charging more than once a day – and even then only on a couple of occasions.

The actual mechanics of my move were simple: for instance, I’ve used Google Contacts and Calendar for years. The first app that I bought was Tasker, which epitomises the flexibility of the platform. It can be a little bit tricky to navigate, especially as the majority of the documentation predates the current UI, but I’m getting there, with various functions set for when I hit / leave my home wifi, when I plug in headphones, and so on.

So on to some of the stuff that’s not so hot. I have a side-by-side comparison with one very specific iPhone app which I used every day for years on my early morning walk to the station: TuneIn Radio. It is now completely unusable: I get about 10 seconds of radio followed by 40 seconds of buffering. This could be specific to the carrier [I haven’t changed, it’s just what the handset offers], but on paper HSPDA should be faster than the 3g service I was using. Stuck in the back corner of our house – again a side by side comparison – the wifi reception is also not as good as on my 4S.

The various views that the Nexus desktop provides: the home screens versus the All Apps view that runs flows into the unkempt wilderness that is pages and pages of widgets – I mean who thought that was a good idea? I know why it’s there, it’s just messy.

A few more mini-gripes. I’m not that keen on the music app, and haven’t really found a podcast app that I’m sure is a keeper [BeyondPod seems to be popular but the full version for £4.49 strikes me as pretty expensive]. In the interest of balance, it has to be said that the podcast app on the iPhone had morphed into a real frustration. It was a dark day when it was carved out of warm embrace of the iPod app: the cost of not synching podcasts by wire was something that was borderline unusable. Maybe iOS 7 will bless us [and I still cradle my iPad every day] with something that actually works.

One of my biggest gripes is with the permissions list that apps are looking for – the double edged sword of flexibility seems to be that developers throw everything at the wall on the off chance that something will stick. I am absolutely prepared to embrace this for Tasker – it needs permissions to do what it says on the tin – and the liberty of life outside Apple’s walled garden is, if you’ll pardon the mixed metaphor, a breath of fresh air. However, the list of perms that that the LinkedIn app [an example of one of many that I’ve passed on] is faintly terrifying. The ability to go in with a pair of tweezers, and toggle perms on a per app basis, is something that iOS does very well. It is coming apparently in 4.3, as a quick google of ‘app ops android’ will show.

The opinion I’ve been fomenting over the last couple of weeks extends what I already knew about the flexibility of the platform, pre-adoption. Fair enough, it is it there for you in Android, but I think that what’s left behind for the average person who couldn’t be bothered is not as polished or well considered. I think the ‘average person’ in this instance subdivides into two: people who either skim across the surface, or just install software with impunity.

Apple has a very accessible platform, and one that protects you from potentially poor decision making. I’m sure there are plenty of people out there wondering why their phone is glowing at night, when it’s churning through a dozen fat processes in parallel in the background. [Apple have been particularly conservative here, and the whole background process functionality was something of a hobby for me – right up until Washing Machine Day :(. It will be interesting to see how the new background functionality continues to develop from iOS 7 onwards.]

I’m only a few weeks into Android so I’m sure my opinion will refine, if not change. Was the move off the iPhone one-way? I’m not sure. Would I ever consider buying a ‘premium’ Android phone? No, I really can’t see it. That takes you into OS fragmentation territory, and an experience that is still predicated on good old Android.

One other thing I’m pretty sure about: I’m not going to develop for it. I have spent the last couple of years teaching myself Objective C and I can’t face Java!

iPhones and Washing Machines: Limping to the Finish Line

My iPhone 4S had an unfortunate encounter with the washing machine at the weekend, which amounted to about 20 minutes of water exposure – not to mention detergent, and whatever goodies conditioner contains [for that softer, fresher smelling iPhone!]. We tried the recommended bag of rice trick for 24 hours, which didn’t work. When I opened it afterwards it was still soaking wet, and the battery was leaking. I took out the motherboard and dried it off, and spotted some corrosion on the camera connector. Clearly, any recovery from the condition it was in was going to be a borderline miracle, but I thought ordering up a new battery was worth a shot.

I duly replaced the battery tonight [all told about 2 1/2 hours worth of fun – it’s late!] and, rather surprisingly, it booted up with iTunes presenting me with a request to unlock the device. Rather less surprisingly, the screen doesn’t work. I did a bit of searching to find out which connector was for the screen data [I can find no others that drive the screen in any separate way], and spotted a serious amount of corrosion which I either missed at the weekend, or which has subsequently appeared. Here’s a macro shot before I cleaned it with a toothbrush:

Corrosion

…and after. Magnification is slightly better with this shot because I used a cheap and nasty extension tube:

Culprit

In the top right, the third contact from the end appears to have completely corroded. While it may not be the only damage stopping the screen from working, it’s got to be part of the problem.

I was planning on upgrading to whatever Apple releases in the next couple of months anyway. In the meantime, I have the dubious pleasure of a Nokia clamshell from the previous decade. I’d forgotten what a joy predictive text was :).

Motion Detection, Raspberry Pi & HP HD-2200

So, there is a fair amount of information floating around the web on this, and I’ve hit on a couple of wrinkles which are worth sharing.

As I mentioned in my previous post, I had got the motion package up and running very quickly with my old EyeToy camera. As the picture quality was pretty awful, I ordered up an HP HD-2200, which arrived this morning. The over-riding principles for picking this camera are that it is supported [obviously!] and that it doesn’t need any external power.

This produced images straight away too, but when I ran it on the  width and height parameters in the motion configuration that I’d been using for the EyeToy [640 x 480], I was getting what looked like a scanning line at the bottom of the image and the motion software seemed to go into a loop [based on my horrible hacky configuration – more on this in a moment].

The motion documentation indicated that this was probably an issue with the chosen resolution, so I started to chop and change it. This was the start of a couple of hours [EDIT: make that half a day!] of messing with various resolution settings, and researching the problem. The camera documentation refers you to the functionality of a Windows binary for adjusting this and, because I’m running on a Mac, this wasn’t an option. I found a list of width / height settings on a random shopping site selling the camera, and I went through all of them – I won’t link to it as none of them worked.

I tried doubling the default resolution [still divisible by 16, as required by the motion software] and… This is inconclusive. It worked, then I changed the settings, and changed them back to 704 x 576, and it stopped working again. Continuing to mess with the settings caused the kernel to crash at one point. I also wasn’t seeing anything particularly helpful in /var/log/messages – it just seemed to be a copy of standard out – i.e., what’s logged to the screen when you see when you start the motion from the command line.

I did another reboot [a little more graceful this time] with the camera unplugged, reverted to 704 x 576, and it’s now working again, but I’m not convinced about the stability.

One other quick point: there is a fair amount of documentation which refers to the motion configuration option on_event_start, which gives example setting for gMail. While I’m using some of the advanced authentication options for Google [being a security bore], I couldn’t get this to work – I kept getting an SSL error. The example I saw every time was of an email indicating that a file had been uploaded to an FTP server [which I also played with].

I wanted to send the file via email. So I came up with another solution, which unfortunately won’t suit everyone’s needs as I created my own mail account on one of the domains I own. So I’ve created a sacrificial account for the sending of non-SSL emails [for now]. The incantation I’ve used to email the file is:

on_picture_save sendEmail -f myacc@mydomain.com -t myacc@mydomain.com -u “movement” -m “I’m at it again” -s smtp.mydomain.com -xu myacc@mydomain.com -xp my password -o tls=no -a %f.

So your mileage may vary here, assuming that your smtp server requires authentication [which it should], and that it is also happy to not speak TLS [which it may not]. So the -a %f is what adds the image file as an attachment.

This also uses sendEmail, which is a  Perl wrapper to sendmail, as it’s a bit easier to use from the command line.

EDIT: I’m coming to the conclusion that the HD-2200 won’t support a resolution higher than the default [352 x 288] the motion package. A more careful look at the logs, after yet another unexplained end to motion loading with my config, showed that it was resetting the resolution to 800 x 600. This is unsupported, as 600 will throw a modulo 16 error if you try to start with this width. That, at least, is reasonably consistent.

I found a thread on a bulletin board in relation to another error I was seeing [Config palette index 8 (YU12) doesn’t work], and which required the install of a library, libv4l-0. I duly installed this, and made the error go away, but still no joy with upping the resolution.

Oh well, if the images being produced are smaller than on my old EyeToy, at least they are a darn sight clearer.

[Final update on this]. I’ve been working on this for about 6 hours now, and am about to leave the field of play. I’ve tried doing some changes to the palette setting, based on running motion in setup mode [the -s flag on the command line]. If you do this at a resolution higher than the default but with the default setting for v4l2_palette [8] you see the following:

[1] Config palette index 8 (YU12) doesn’t work.
[1] Supported palettes:
[1] 0: YUYV (YUV 4:2:2 (YUYV))
[1] 1: MJPG (MJPEG)

I’ve had a play around with the corresponding flags for these [2 and 6], and they both have problems at 640 x 480. My conclusion is that 352 x 288 is as high as a resolution as usable with the motion package. AKA I’m conceding defeat!