gpt4 book ai didi

android - RECORD_SOUND_ACTION Intent ,直接进入录音列表

转载 作者:行者123 更新时间:2023-11-30 04:05:50 25 4
gpt4 key购买 nike

我有一个应用程序可以触发录音机的 Intent (RECORD_SOUND_ACTION),但我希望它直接进入录音列表。我可以添加 putExtra 以获得此结果吗?

最佳答案

我假设您有一部 HTC 手机——我认为 Voice Recorder 是一款普通的 HTC 应用程序,而不是 Android 标准应用程序。如果是这样的话,如果你能找到 apk,你也许可以使用 AppXplore 对 Intent 进行逆向工程。 --尽管这只适用于拥有 HTC 设备和/或兼容版本的录音机的人。我不推荐它。

或者,您可以毫不费力地调用 ACTION_PICK,然后在返回的文件上启动音频播放器。至call an audio file chooser :

Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(Intent.createChooser(intent, "Gallery"), reqCode);

或者,

Intent intent = new Intent();
intent.setType("audio/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Audio "), reqCode);

关于android - RECORD_SOUND_ACTION Intent ,直接进入录音列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11697391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com