This is my first “fully functional” Android App.  More of a tech demo actually, teaching myself how to develop on an Android device.  The learning leading up to this is featured on this blog, specifically these posts:  Android Adventures Part 1, part 2, part 3, part 4, part 5, part 6.

Floater is a particle sim that detects the accelerometer on the device, acting quite like an Alka-Seltzer pill if trapped in your phone… that changes color:  Via touch, you control a large circle that emits smaller particles that ‘float up’ irregardless of how the phone is held.  If the circle is flicked it will bounce around vibrating when it hits the edges of the device.

I built this app on an Win XP box, via Processing, specifically the “Android – Processing” distribution v1.2 (build 0191).  It was tested on a (rooted) Samsung Captivate (Galaxy S), running Android 2.1.

Devices it’s known to work on:

If you get it to work on your device shoot me a mail, or comment below.

Download and install floater08:

Direct Download: floater08.apk

This isn’t yet on the Android Market, so to install you’ll need to have “Super User” (root) access on your phone, or enable “Settings -> Applications -> unknown sources” if your phone allows it.

    • Craven
    • January 10th, 2011 8:35pm

    Seems to work fine on DroidX.

  1. Great, thanks!

  2. Playing with floater on a Optimus S. Very simple and relaxing.

  3. Thanks!

    • Lars
    • January 18th, 2011 2:09am

    Works great on a Galaxy Tab.

    Could you also publish the source code of the final version or did I maybe miss it?

  4. Glad to know it, I was wondering how it would work on a tablet.

    I haven’t decided if I’m going to publish the source or not yet: I may eventually turn it into something more robust for posting on the Market. If it’s on the Market for actual money, I want to protect my interests. But if I don’t charge for it, or don’t put it on the market at all, I’ll happily publish the source.

    However, it’s a combination of most of the “Android Adventure” topics I’ve posted about, so while the physical source isn’t up there, nearly all the knowledge to make it on the Android hardware (short of the Processing fundamental stuff to actually do the object drawing) is on the page.

    • pv
    • January 24th, 2011 5:54pm

    interesting… 26 fps on my Desire HD

    • Lionel
    • February 7th, 2011 7:10am

    works well on LG Optimus P500 under Froyo

  5. Thanks for the info!

  6. thanks for this tutorial!

    works also fine in samsung galaxy 3

    • Alex
    • February 9th, 2011 6:32am

    Works without any issues on Motorola XT5 with Android 2.1
    But frame rate is low ~14fps

  7. Interesting. I get around 20fps with 170 balls on screen. I didn’t write it for performance though… mainly just to get it to work, period 😛

    • Alex
    • February 10th, 2011 4:07am

    So, as I said – it works good.

    btw, thanks for your processing for android posts. I gonna follow them to write my experiments.

    • stc
    • February 13th, 2011 12:06pm

    works well & smooth (~20 FPS) on Motorola Defy (android 2.1)
    thanks for your processing/android blog posts, very useful for the p5people

  8. Glad it works, and glad to contribute to the knowledge pool :)

  9. Successfully installed on my Galaxy S. Runs very smoothly and is beautiful!

  10. suhweet!

    • Arthur
    • February 28th, 2011 10:24am

    Works just fine on archos 32 internet tablet. Going to browse through your adventures to start building my own!

  11. Great, and good luck :)

    • brent
    • March 31st, 2011 11:14am

    works fine on my HTC Evo 4G

    • Mike
    • April 17th, 2011 12:35pm

    Works on the Sony ericsson ARC

    • gato
    • April 25th, 2011 11:13pm

    works well on a samsung intercept (VM) running 2.2

    • guu
    • April 28th, 2011 7:35am

    Works well on a HTC Hero running CyanogenMod 7. I get a really low fps (6-10) and it doesn’t vibrate.

    • soo
    • May 9th, 2011 11:40pm

    Great, and thanks for the Android Adventures
    HTC Desire 2.2 works well (19-22 fps)

    • Sam A
    • June 3rd, 2011 9:16pm

    Works on HTC Aria! Thanks for the Android Processing articles.

    • Sam A
    • June 4th, 2011 9:00am

    @Sam A
    Oh, forgot to mention, I’m running CyanogenMod7. HTC Aria is on ATT and it doesn’t allow for sideloading of apps. In case someone was wondering how I installed it….

  12. Works perfectly on my Nook Color running Cyanogenmod 7.0.3 stable (Gingerbread 2.3). Don’t know how to see/check the FPS.. but it runs smoothly.

    • alex pop
    • July 11th, 2011 3:01pm

    it works also on Galaxy S2

    • Mark plaga
    • July 16th, 2011 11:13pm


    Works great on a Samsung Charge.

    Best regards,

    Mark Plaga

  13. works on Motorola Droid but at 9FPS , nice look , thx 4 sharing the tutorials !!

  14. It works great on a Nuvifone A50 by ASUS/Garmin

    • fuman
    • August 23rd, 2011 6:51pm

    Works on Motorola XOOM. Frame rate is a bit choppy.

    • David
    • September 1st, 2011 10:04am

    Works well on Nexus S
    20 – 30 fps depending on number of balls.

  15. Works on my HTC Desire Z. Pretty cool, nice work. Just on 20fps

    • morgulbrut
    • October 11th, 2011 1:31pm

    Works well on a Garmin-Asus A10.

    11-15 fps

    And thanks for your tutorials

  16. Oct 23 2011

    Hi from Huntington Beach, Ca

    Nifty program (will check out the development language too), looks interesting.

    Floater app works and looks great on my HTC EVO 4g View tablet (@ 25 fps).

    Cheers //GregH

    • Lazarua
    • February 18th, 2012 7:41am

    This is amazing, thanks for sharing.
    I downloaded it for my Samsung Galaxy y, works perfectly.

    • Greg
    • April 12th, 2012 4:47pm


    Works great on Motorola Atrix! Thanks for sharing… I am presently trying to utilize some of your code for accelerometer data to control some servos for an art project. It is still early in the development process but I am hopeful that it’ll come together. Thanks you again for sharing… no better way to learn than by trying things out.


  17. Works great on Acer Iconia A500 tab. 12-14 fps with 220 balls.

    Thanks for amazing site, its a real help.


    • Method
    • May 18th, 2012 5:19am

    Works fine on a Galaxy Nexus running android ics 4.0.4

    and thansk for your android adventures posts. i also wanna try to build some android apps with processing, but my skills aren’t that good yet.

    • n
    • June 7th, 2012 4:18am

    Tried it on Galaxy note, worked
    But truing the home button without closing the program i had wierd hickups on the screen and the phone gor unresponsive, i then had to do a hard reset.
    Still like it though,
    Any change of getting the code for learning ?

  18. You know, I always meant to post the code, but forgot, moved in the meantime, and changed computers. I’ll have to see if I can dig it up 😉

    As far as the reset, that is odd… but I authored this about 2.5 years ago on Android 2.1, so the fact it continues to function on newer hardware impresses me 😉

    • vydd
    • September 20th, 2012 8:53am

    Works nicely on HTC Desire C. 23-30fps

    • Aditya
    • July 22nd, 2013 9:34pm

    Works great on Sony Ericsson Xperia Mini pro ~30 fps. Very soothing.

    • V. C.
    • September 4th, 2013 10:15pm

    This doesn’t appear to vibrate on my Samsung Galaxy Note 10.1. In addition, it seems as if the detection for the accelerometer is rotated by 90 degrees.

    I got here from your vibrate tutorial http://www.akeric.com/blog/?p=1334 which I unfortunately couldn’t get Processing to even compile.

    • V. C.
    • September 5th, 2013 12:32am

    Scratch that. Vibration does work! (My bad. New device. D:) However the sketch still seems to think that down is right.

    Would you be willing to help me a bit in getting your example code working?

    • V. C.
    • September 5th, 2013 12:58am

    Scratch that again. I got your example working by merely reading the comments more closely. It seems an import is missing.

    import android.view.MotionEvent;

    Works great. Thank-you so much a hundred times.

    • Joshua N
    • December 6th, 2013 4:51pm

    Works on nexus 7 running 4.4 nice little app, framerate isnt best but not bad