简体   繁体   中英

How do I know if I can play real music on Android?

I want to test the music app with automation. However, there is no way to verify that the music actually plays. I created an app using the audio focus. I think the audio focus is not related to real play back. Because if it doesn't play, audio focus can hold onto the focus.

So, I want to create an app to confirm playback. What should I do?

Make the test app listen to the microphone. Play some special signal (a sweep or a click of some sort) that can be easily distinguished from the noise in the recorded signal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM