简体   繁体   English

Android Pie:以编程方式启用“自动记录所有呼叫”

[英]Android Pie: Enable “Record all calls automatically” programmatically

Call recording APIs doesn't work on Android 9 anymore通话录音 API 不再适用于 Android 9

Inbound & Outbound call recording on Android 9 doesn't work anymore using MediaPlayer. Android 9 上的呼入和呼出电话录音不再使用 MediaPlayer。 Only one sided voice is recorded (ignoring incoming voice).只记录一侧的声音(忽略传入的声音)。

With new Android 9 OS, it comes with in-built feature of turning on automatic call recordings.使用新的 Android 9 操作系统,它具有打开自动通话录音的内置功能。 A solution to this could be to use the default phone system app, by enabling record all calls automatically.对此的解决方案可能是使用默认电话系统应用程序,通过启用自动记录所有呼叫。

So far only manual steps have been documented as mentioned below:到目前为止,仅记录了手动步骤,如下所述:

Vivo Go to Settings > System app settings > Phone > Call recording to enable Record all calls automatically Vivo Go 到设置>系统应用程序设置>电话>通话录音以启用自动记录所有通话

Xiaomi Steps may differ小米步骤可能不同

Samsung Steps may differ三星步骤可能会有所不同

Need to achieve this programmatically需要以编程方式实现这一目标

  1. I am looking for a solution to do this step programmatically keeping all mobile proprieties under consideration.我正在寻找一种解决方案,以编程方式执行此步骤,同时考虑所有移动属性。

  2. Also need to fetch the default recording path programmatically (from settings on android phone) where the recording is auto-saved after call ending.需要以编程方式获取默认录音路径(来自 android 手机上的设置),其中录音在通话结束后自动保存。 For Vivo phones, this recording path is Internal_Memory/Recorder/Call/.对于vivo手机,这个录音路径是Internal_Memory/Recorder/Call/。 It varies depending on mobile manufacturer.它因手机制造商而异。

Any help on this would be highly appreciated.对此的任何帮助将不胜感激。

In order to solve your problem of finding the default path of the recorder.为了解决你找不到刻录机默认路径的问题。 I got all the media files from storage with extension.mp3,.aac etc., and sorted it based on last modified name.我从存储中获取了所有带有扩展名.mp3、.aac 等的媒体文件,并根据最后修改的名称对其进行了排序。 The last file name and path gives the path of the default recorder.最后一个文件名和路径给出了默认记录器的路径。

TreeMap<Date, String> sortedMap = new TreeMap<Date, String>(all.mp3,.aac etc., files);

` File[] listRecFiles = song.listFiles(); ` 文件[] listRecFiles = song.listFiles();

            for (File filesName : listRecFiles) {

                if (filesName.getName().endsWith(extension)) {

                    modifdate = modifiedDate(filesName.getPath().toString());
                    songMap.put(modifdate, filesName.getPath());
                }
            }`

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

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