The bildr guide has explains the 2Y0A21 as well as other proximity sensors.
VGA 640×480 and 8 Colors from an Arduino!
A Simple Guide to Using a Hall Effect Sensor With Arduino
First install the library if you don't have it yet ().
Alloet 5Pcs RGB Sensor Gesture Arduino APDS-9930 Proximity Sensor for Arduino.
Download Proximity for Arduino apk 1.0 and all version history for Android.