简体   繁体   English

我怎么知道我是否可以在Android上播放真实音乐?

[英]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. 播放一些可以与录制信号中的噪声轻松地区分开的特殊信号(扫频或喀哒声)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android上访问Google Play音乐库? - How do I get access to a Google Play Music library on Android? 如何使我的Android应用程序播放手机音乐播放器中的音乐? - how do i make my android application play music from the phone's music player? 如何访问Android默认音乐应用程序创建的播放列表并调用音乐应用程序播放? - How can I access playlist created by android default music app and call the music app to play it? 如何在Webview中播放音乐? - How can i play music in webview? 如何在Google Kitkat 9上通过Google的adb命令通过mp3文件播放mp3文件? - How can I play a mp3 file via adb command with google play music on android kitkat 9? 如何在我的Android应用中使用下载的Google Play商店音乐? - How do I use downloaded Google Play Store music in my android app? 如何使用 Android Spotify SDK 在应用程序中直接播放音乐? - How can I play music directly in an app using the Android Spotify SDK? 如何为Google Play音乐创建直接链接? - How do I create a direct link for google play music? Android:如何切换音乐? - Android: How can I toggle music? 如何通过URL的视频视图实时知道视频在android VideoView中的启动时间? - How can I know the real time the video starts in android VideoView with the video view from URL?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM