Samsung S1 detection and tracking source code