Damian's Blog .NET from Geneva, Switzerland

18Jul/100

Tilt to turn pages in Kindle Android: Nope!

I bought an HTC Desire Android mobile phone a couple of months ago.

When I first got it, there were two applications that were missing that I really really wanted: Audible and Kindle.

image

Both were recently released, and despite this, my life is in fact not now complete.  There must be some other app for that.

I’ve been thinking about what I could develop.

As I read using the Kindle app the screen becomes smudged with my tapping the screen to change the page, and I thought it would be nice if I could change pages by tilting the phone to the right in a quick nudge.

I defied the temptation to start coding, and did some research.  It looks like it isn’t possible to do what I want using the public SDK, and to save myself the pain of rediscovering why in six months, when I have forgotten, here are some notes.

For this to work I’d need three things: A background process (called a service on Android), a way for it to detect when the phone has been tilted, and a way for it to tell the Kindle App to change the page, when it is running.

Creating a background process is pretty straightforward, and there is a sensor API that can be used to detect when the phone has been tilted.

Telling Kindle to change the page isn’t so easy.  I thought I’d found it when I discovered the IWindowManager.injectPointerEvent method, but I quickly found that this was not part of the documented Android API, and using it would be very very bad.

I was left with trying to find out whether the Kindle App itself had any way for other apps to tell it to change page.  The standard way of doing this would be to expose an Intent which other apps could invoke.

Unfortunately by dumping the Kindle App’s manifest from its installation (APK) file, it looks as though the only intents exposed are the standard MAIN, LAUNCHER, VIEW, DEFAULT and BROWSABLE intents.

Game over, unless I’m willing to go beyond the public API, which I’m not, right now at least.  Unless anyone else has any ideas?

11Apr/0913

Windows Home Server needs a peer backup system

I've just set up a Windows Home Server on my home network, and so far I think it is fantastic. I've been able to collect an assortment of hard drives and plug them all into the same machine, and have them seamlessly presented as a single large virtual drive:

image

Our photos are stored in a shared folder hosted by the Windows Home Server, and by enabling the "Duplication" feature, I know that copies are kept on two physical disks, meaning that in the event of a hard disk failure, I'll still have a copy on another disk.  I've also been able to set up all of the computers in the house to be backed up.

There is however, as others have noted, a big flaw in this situation. Although I have all my photos duplicated on two disks, and all my computers backed up , in the event of a fire, or theft, I'm screwed.  Someone could walk off with all the physical disks.

What I really need is off-site backup. I've been doing this using an excellent service called Mozy, which for US$5 a month offers unlimited backups for a single PC.  Unfortunately Windows Home Server is based on Windows Server 2003, and Mozy will not run on Server operating systems.

A modest idea: a peer backup service

What I'd like to have, and what I'm tempted to develop, is a peer backup system, implemented via a Windows Home Server Add-in I'd create, and a web site which serves to hook people's Windows Home Servers together.

My idea is this: I'd create a web site where people could register (probably automatically via the add-in) their need for an off-site backup, indicating how much space they need to backup. They need to commit to making an equivalent amount of space available on their computer for someone else.

My web site would match people up, and then the people could use each others systems to automatically perform offsite backups.  The add-ins could talk to each other, either peer-to-peer, or via my web site. There are issues of course. The backed up data would have to be encrypted, which makes incremental backups problematic.

The next obvious step would be to allow the backups to be stored redundantly across the computers of multiple participants, so that you are not just reliant on one other person.  For this to work you'd need to volunteer to make available much more space for other people's backups than your own backups require - perhaps twice as much.

I'm tempted to develop this service, however  I'm not sure how I could cover my costs. Would you pay say US$25 a year for a peer-based secure offsite backup service?

Filed under: Product-Ideas 13 Comments