So you want to try light painting on your smartphone? Air Pencil from Adtile has you covered. It captures motion using a smartphone. Just move, swing, or glide your smartphone through the air, and the app captures 3D motion on your screen. The app runs on a mobile web browser and uses proprietary algorithms to analyze gathered sensor data.
The app is currently in beta. The above video should give you a better idea how it works.