How would I measure how long my finger has been in front of the proximity sensor? I am making a mp3 player app and right now when I wave my hand over the sensor it changes songs. I wanted to add the functionality of holding it over the sensor for a couple seconds to pause it and likewise to unpause it. I have a feeling I should use system.currentTimeMillis(), but I am not sure how to implement it.

What platform/api you using? can you leave reference to specific class?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.