TypeScript UI Launched

On Saturday I launched TypeScript UI. This is a new web-based project which I have created. Summarised, it is the following:

TypeScript UI is a user-interface library written in TypeScript language. It is in Windows 8 Style and provides a powerful structure for creating HTML5/CSS3 web-based apps with an app/window-based design structure. It works in any HTML5 capable browser (subject to limitations of host PC) but also includes fallbacks for IE9 and Opera.

The project aims to make HTML5 app development much easier by treating the browser as a platform to build within. The library offers an app/window structure that allows you to create apps with multiple windows that all run within one page. The UI is built and handled entirely in TypeScript within the client browser which reduces server load and increases quality of animation and UI adaptability. The server is restored to its status as a data handler making servers more efficient and server side code less bloated.

TypeScript UI also aims to include some of the best features of UI libraries such as those found for Windows desktop. For example, future versions of the library will include Data Binding to allow more efficient design and data handling. The library will also provide default windows such as splash screens, login forms and other common app components. And since it is written in TypeScript, large-scale app development and maintenance is very easy.

Head over to the project on CodePlex and download the latest version! Alternitavely, check out the live Demo!

TypeScript UI Demo
TypeScript UI Demo app
TypeScript UI Demo DropDown
TypeScript UI Demo – DropDown box

Pocket

The Pocket logo.
The Pocket logo.
The Pocket logo.

A nice little discovery today thanks mostly to this article. Pocket is a very handy free service that allows you to save web pages (mostly articles but videos and images too) for later reading. Not just reading though, which is one of the two cool features I’ll point out later. It has apps for desktop, Android, iOS and even things like Chrome Extensions. I have downloaded and installed the Chrome extension, Chrome App and app for Android (4.2.1). There are two main wonderful things about this app.

1. Auto-sync

As soon as you save to Pocket, it immediately pushes the content to all your other devices or places where you are logged in. So your phone can auto-download the content. (There is an option to make this only over Wifi). So as soon as I save an article on my PC, I can immediately view it on my phone. Okay, great you’re thinking. Why not just read it on my PC? Well here comes the second epic feature!

2. Text-to-speech

The Android app has been designed to integrate with Android’s built in TTS. In the menu of the app (when viewing an article) simply select TTS and you can listen to the article there and then – so much better than reading it! I can now do other things at the same time. Oh, but you don’t like the Google TTS voice? Not a problem. I searched the app store and quickly found IVONA. IVONA is high-quality, free TTS voices that install and can be selected for your phone. To install IVONA follow these steps:

  1. Go to the Play Store and search for IVONA Text-to-speech
  2. Download and install it
  3. Open IVONA Text-to-speech – this will take you to the IVONA website
  4. Go down the list and find a voice for your language then click on it to open it in the Play Store.
  5. Download and install the voice’s app.
  6. Run the voice’s app and it will download and install the necessary files.
  7. to set this as your phone’s voice go to: Settings -> Language & input -> Text-to-speech
  8. Select IVONA as your preferred TTS app
  9. Click the “Settings” icon next to the IVONA option
  10. Click “Settings for IVONA Text-to-speech” option
  11. Click on the voice you just installed

Done! Your new voice is installed. This voice will now be used for all apps on Android that use the built-in Android TTS service but Pocket is the first app I’ve found that will make good use of it. Enjoy listening to articles and queueing others up for later 🙂

Sharing Mouse, Keyboard and Clipboard

So you’ve got a computer and a phone – right? Just like most people…but what most people don’t realise is that you aren’t limited to just using one at a time. We’ve all probably heard of dual-screen (one computer, 2 screens, double the area to work on) but until recently, I hadn’t heard of mouse/keyboard/clipboard sharing (nicely shortened to ShareKM). ShareKM allows you to share your computer’s keyboard, mouse and clipboard with your Android phone. It’s very simple, very easy to set up (well, with some caveats) and above all, allows you to utilise the power of all your devices at once!

I’ll deal first with sharing from an Android (Galaxy S2, but any Android phone would do) to a Windows 7 PC.

Requirements:

  1.  A Windows 7 PC (and enough permissions to install stuff)
  2. A Rooted Android Phone (Galaxy S2)
  3. Access to the Play Store on said phone

Why Rooted?

Well, “rooted” really just means that apps can have access to Android’s (i.e. Linux’s) low level interfaces and allows them to override (or, if you prefer, “interfere with”), the main functions of the operating system. Our use of this is to override the default kayboard/mouse I/O operations and also to take control of the clipboard. The app also takes over the phone’s screen rendering to place a mouse cursor on the screen and also adds 2-touch mouse support (Ctrl+Left Click+Drag Mouse).

Most phones are not rooted when you buy them. Most contracts do not allow you to root your phone without voiding the warranty.

It’s at this point that I have to say, continue at your own risk.

Though I would not regard what we are doing as particularly risky. I spent about a day studying online forums and researching how to root my phone safely and I haven’t looked back since – I haven’t had a single problem, I haven’t ever bricked my phone and I still have all the music on my phone that I did 3 months ago – I haven’t lost any data (just a few app settings…but not data). So, to root your phone you…search on the internet. Every phone is different and there isn’t really one set way of doing it. It’s been quite a while since I did mine but here’s a few pointers and links to help:

  1. Rooting your phone means changing the fundamental way your phone works
  2. This means changing the operating system permissions to allow you to grant apps root access
  3. Underneath the Operating System is what is called the Kernel
  4. The Kernel handles A LOT of the fundamental workings of your phone. Crucially, it can handle root access
  5. Stock (i.e. manufacturer-installed) kernels block root access.
  6. Your aim is to replace the kernel with one that allows root access.

Point (6) is where the risk is. The kernel handles the boot up and low level commands of your phone. Without it, your phone just won’t run. If replacing it goes wrong and you can’t boot into Download Mode (which allows you to replace any file on your internal SD using software on your computer which would allow you to try replacing your kernel again till it works), then your phone is bricked. Sounds scary? Please don’t be. Bricking your phone is surprisingly difficult unless you deliberately ignore advice or rush through things without thinking. Follow tutorials/videos (mostly videos) properly, and you’ll be fine. If you don’t understand something – research it! Google is a wonderful tool 🙂

You’ll here the terms ADB, Odin, Heimdall, Download Mode, Kernel, Recovery Mode and ClockworkMod (CWM) used a lot. A brief summary of what they are:

  1. Kernel – see above paragraphs.
  2. Download Mode – Instead of booting into the main operating system, your phone starts a different system which allows you to send ADB commands to it via USB. (Please don’t tell me you don’t know what USB is…)
  3. ADB – Android Debug Bridge. Okay so it sounds unrelated but ADB allows you to send the phone a whole range of commands including ones to replace files, for our purposes, the kernel files.
  4. ClockworkMod (and Recovery Mode) – A very talented programmer took an Android Kernel and adapted it to add an extra mode (similar to Download Mode) except it is totally separate, it runs Recovery Mode, it allows you to “flash” i.e. overwrite almost any file in the system making installing new operating systems or kernels very easy. It also provides extremely useful (if not vital) backup and restore functions. ClockworkMod is not installed by default – the first time you root your phone, this will probably be the kernel you install as replacement (or at least a variant of it – there are many).
  5. Odin/Heimdall – These are pieces of software that run on your desktop (or laptop) computer. They connect to your phone via USB and send the ADB commands along with any specified or necessary files. They are a nice way of dealing with ADB.

So to root your phone you’ll do something along the lines of:

  1. Download new kernel files
  2. Download and install Odin or Heimdall (one or the other, doesn’t make a great deal of difference. I used Heimdall but Odin seems to have a better user interface.
  3. Make sure phone is fully charged – this really does matter!
  4. Reboot phone into Download Mode (usually press and hold Power, Home and Volume down buttons together, then press Volume Up to confirm that you wanted Download Mode).
  5. Plug phone into computer using USB – don’t expect this to be enough power to keep your phone charged; it may well not be!
  6. Start Heimdall or Odin
  7. Flash (“copy”) new kernel files to phone, overwriting the stock (default) kernel.
  8. Eject phone safely
  9. Disconnect USB, close Heimdall/Odin
  10. Power off phone.
  11. Power on phone as normal – don’t hold any keys etc.
  12. Phone should boot as normal.

After your phone starts up, you may well want to immediately shut it down and boot into Recovery Mode and make a backup. This will prevent you losing any data in the future and avoid the risk of permanently bricking your phone. I have not succeeded in losing any data because the one time something went wrong, I simply restored to my previous backup! It is helpful if you have an external SD card as the backups are quite large.

Helpful links (as promised):

  1. The best tutorial I know of – this guy is great! Straight forward, to the point and easy: Galaxy2Root.com – How to root S2  This is a 9 step tutorial with all the downloads that you need.
  2. The Odin XDA Forum page, for latest versions: http://forum.xda-developers.com/showthread.php?t=1738841
  3. Heimdall home page: http://www.glassechidna.com.au/products/heimdall/ (Scroll to bottom of page for downloads, no install required)

Advice: If searching Google, the XDA Developers site is very helpful!

Setting up ShareKM

ShareKM works via Wifi, USB or Bluetooth. The app is called “Share Keyboard & Mouse (Beta)” but really, apart from slightly poor English, there isn’t much “beta” about it. If you have a few connection issues at first, reboot PC and phone, then plug in your phone (via USB – recommended for best responsiveness), then start up the phone client and then finally the desktop client. This only works on Windows! Search the Play Store for ShareKM, install the app.

Now go to: https://sites.google.com/site/droidskm/ then download and install the Desktop Setup file.

To set it up:

  1. Disconnect phone from computer (and close the app if you have opened it)
  2. Start ShareKM(USB) – it installs a different link for USB, Wifi and Bluetooth. Use USB for best performance.
  3. If the window is hidden, right click the tray icon and click “Show” (in bold at the top).
  4. Click “Setting” (yes, it should have an “s”) in the bottom righthand corner.
  5. Select where your phone is relative to your screen (probably “Bottom”)
  6. I suggest you ignore the other optins for now – fiddle with them later if you like.
  7. Click “OK”
  8. Now, start up the phone app
  9. Plug in phone using USB
  10. Both should say connected, then the phone app will hide itself.
  11. Your keyboard, mouse and clipboard are now shared!

Sharing between computers – Synergy

I also share my keyboard, mouse and clipboard simultaneously (and stably) with my Debian Laptop. To do this, I use are rather more professional looking piece of software but one which is still free and a completely open and donation funded project, called Synergy. Synergy does the same as ShareKM but between PC, Linux or Mac (in fact, ShareKM was created based on Synergy!). Just go to Synergy-foss.org and download the software for your systems. Its very reliable and very easy to set up.

Enjoy the delights of making better use of your hardware and utilising all that power “to the max”!