Feeds

How to hack a Sony Reader

Inside the Linux-based e-book viewer

Build a business case: developing custom apps

More tweaks

You’re not limited to simply altering the text that appears on some of the screens - you can actually add additional functions, though this is where things start to become somewhat less straightforward.

For a simple tweak, look at the applicationStart.xml file. You’ll see definitions near the top for the different keys, for example:

<string key="6" do="doDigit" />

for the non-numeric keys, there are entries such as:

<boolean key="0x27" do="doCenter"/>
<boolean key="0x27-hold" do="doCenter"/>

Assigning a global built-in function to one of these keys is achieved by changing the value of the do parameter. A popular tweak uses the long press on the centre of the navigation button to shut the Reader down, though you could equally choose to use it to much the audio. Just change the do= value to doDeviceShutdown or doMute if you prefer.

More complex customisations tend to rely on adding extra code in the main.xml file. Look through, and you’ll see that there’s a group tag for the different screens, as for the About screen that we tinkered with earlier. The <code> tag allows you to define specific functions for that page, each within its own <function> tag.

Look, for example, at the PAGE_GROUP, where you’ll find a function with the id “pageChanged” which updates the bottom of the screen with the current page of the current book. A similar function is found in menus.

And another popular hack adds a clock to the bottom of the screen. A call to this.shd_clock() is added at the bottom of “pageChanged”. Then, a new function shd_clock is defined, using a function tag, which starts like this:

<function id="shd_clock"><![CDATA[
var time = new Date();
var show = "";

It goes on to checks the preferences for clock display, and shows the time in the appropriate format, each time the page is changed. A companion function on the About screen uses the 0 key to toggle the clock display between off, 12 and 24 hour. It begins by using doDigit, then checking if the 0 key was pressed, and setting a preferences option appropriately.

Build a business case: developing custom apps

More from The Register

next story
Kate Bush: Don't make me HAVE CONTACT with your iPHONE
Can't face sea of wobbling fondle implements. What happened to lighters, eh?
The agony and ecstasy of SteamOS: WHERE ARE MY GAMES?
And yes it does need a fat HDD (or SSD, it's cool with either)
Apple takes blade to 13-inch MacBook Pro with Retina display
Shaves price, not screen on mid-2014 model
Apple to build WORLD'S BIGGEST iStore in Dubai
It's not the size of your shiny-shiny...
Steve Jobs had BETTER BALLS than Atari, says Apple mouse designer
Xerox? Pff, not even in the same league as His Jobsiness
Apple analyst: fruity firm set to shift 75 million iPhones
We'll have some of whatever he's having please
TV transport tech, part 1: From server to sofa at the touch of a button
You won't believe how much goes into today's telly tech
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Rethinking backup and recovery in the modern data center
Combining intelligence, operational analytics, and automation to enable efficient, data-driven IT organizations using the HP ABR approach.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.