Version developed by Or Sagi during GSOC '13. Complatible for android 3.0 and above