Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

How to Build a “Spy Camera” App for an Android Phone with Ruby and Sinatra

By Peter Cooper / September 2, 2010

It's been a great year for Ruby on Android, but no one knows it. You can start writing Ruby apps for Android devices TODAY. You don't need to install any SDK, you don't need to install some giant Eclipse IDE, and you certainly don't need to write any Java.

Mike Leone

In Turn your Android Phone Into a Remote Spy Camera with Ruby in 15 Minutes, Mike Leone demonstrates how to use Ruby, Sinatra and Scripting Layer for Android (SL4A) to build and deploy a phone-hosted "spy camera" Web service.

SL4A is a system that allows you to run "scripting language" scripts and interactive interpreters on the Android platform. It currently supports JRuby, Python, Perl, Lua, JavaScript, BeanShell, and Tcl. Mike demonstrates how to set up a Sinatra project to use SL4A to run on an Android phone using JRuby. Upon receiving a request, Mike's app takes a picture using the phone's camera and serves it back over HTTP. He has also released the source code to a larger Ruby app called Broadcast that implements general Android device management functionality over HTTP.

Even if you don't want to build a "spy camera", Mike's walkthrough is a must-read if building Web services in Ruby that can run directly on the Android platform is of interest to you.

Comments

  1. Carlos Taborda says:

    Interesting, but also creepy!

  2. Vlad says:

    Great tool. Perfect for those wannabe spies. Also, It is a great proof of concept for integrating web services with the Android platform.

    Vlad
    how to build

Other Posts to Enjoy

Twitter Mentions