Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Automatic call recording #2083

Open
ASerbinski opened this issue Apr 5, 2023 · 28 comments
Open

Feature Request: Automatic call recording #2083

ASerbinski opened this issue Apr 5, 2023 · 28 comments
Labels
enhancement New feature or request priority-none

Comments

@ASerbinski
Copy link

The new call recording code is EXCELLENT, and solves 99% of the problem. The 1% missing is having the recording initiate automatically rather than having to press the button to start recording.

When call recording is used for maintaining evidence of a conversation, sometimes you don't know that its necessary to record the call until the background information is already lost. The best way to address this problem is to always record all calls.

I'd like to see a setting for call recording to always record all calls.
A "nice to have" but not critical second part would be to automatically delete recordings by age, say after 2 weeks or a month.

The below is a patch I was using some time ago for automatic call recording in conjunction with the lineageos call recording patch, prior to it being cleaned up for GrapheneOS;

From 945c17eabfdf9f108b26eda3d54266c0a2255234 Mon Sep 17 00:00:00 2001
From: Adam <adam@AdamWork.lan>
Date: Mon, 8 Nov 2021 14:17:51 -0500
Subject: [PATCH] Automatic call recording

Change-Id: Icdb26fa6729e6a13dc6190a42dc75453900a6345
---
 .../dialer/app/res/values/cm_strings.xml      |  2 ++
 .../dialer/app/res/xml/sound_settings.xml     |  5 ++++
 .../dialer/callrecord/res/values/config.xml   |  4 +--
 .../android/incallui/CallButtonPresenter.java | 30 +++++++++++++++++--
 4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
index 1dcdb2b81..3f7602d44 100644
--- a/java/com/android/dialer/app/res/values/cm_strings.xml
+++ b/java/com/android/dialer/app/res/values/cm_strings.xml
@@ -38,6 +38,8 @@
     <string name="call_recording_format">Audio format</string>
     <string name="wb_amr_format" translatable="false">AMR-WB</string>
     <string name="aac_format" translatable="false">AAC</string>
+    <string name="auto_call_recording_title">Auto call recording</string>
+    <string name="auto_call_recording_key" translatable="false">auto_call_recording</string>
 
     <string name="call_via">Call via</string>
     <string name="call_via_dialog_title">Call via\u2026</string>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index aa025874f..d31ea9e5c 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -83,6 +83,11 @@
       android:entryValues="@array/call_recording_encoder_values"
       android:defaultValue="0" />
 
+    <SwitchPreference
+      android:defaultValue="false"
+      android:key="@string/auto_call_recording_key"
+      android:title="@string/auto_call_recording_title"/>
+
   </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/java/com/android/dialer/callrecord/res/values/config.xml b/java/com/android/dialer/callrecord/res/values/config.xml
index 7aabd6cac..2832c87bc 100644
--- a/java/com/android/dialer/callrecord/res/values/config.xml
+++ b/java/com/android/dialer/callrecord/res/values/config.xml
@@ -16,8 +16,8 @@
 -->
 
 <resources>
-    <bool name="call_recording_enabled">false</bool>
+    <bool name="call_recording_enabled">true</bool>
     <!-- 1 (MIC) for microphone audio source (default)
          4 (VOICE_CALL) if supported by device for voice call uplink + downlink audio source -->
-    <integer name="call_recording_audio_source">1</integer>
+    <integer name="call_recording_audio_source">4</integer>
 </resources>
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index 0fa833edd..175fe7cc2 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -21,6 +21,7 @@ import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.Trace;
 import android.preference.PreferenceManager;
 import android.support.v4.app.Fragment;
@@ -74,6 +75,7 @@ public class CallButtonPresenter
   private DialerCall call;
   private boolean isInCallButtonUiReady;
   private PhoneAccountHandle otherAccount;
+  private boolean isRecording = false;
 
   private CallRecorder.RecordingProgressListener recordingProgressListener =
       new CallRecorder.RecordingProgressListener() {
@@ -114,6 +116,11 @@ public class CallButtonPresenter
 
     CallRecorder recorder = CallRecorder.getInstance();
     recorder.addRecordingProgressListener(recordingProgressListener);
+    if(recorder.isRecording()){
+      inCallButtonUi.setCallRecordingState(true);
+    } else {
+      inCallButtonUi.setCallRecordingState(false);
+    }
 
     // Update the buttons state immediately for the current call
     onStateChange(InCallState.NO_CALLS, inCallPresenter.getInCallState(), CallList.getInstance());
@@ -144,6 +151,8 @@ public class CallButtonPresenter
   @Override
   public void onStateChange(InCallState oldState, InCallState newState, CallList callList) {
     Trace.beginSection("CallButtonPresenter.onStateChange");
+    CallRecorder recorder = CallRecorder.getInstance();
+    boolean isEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.auto_call_recording_key), false);
     if (call != null) {
       call.removeListener(this);
     }
@@ -152,6 +161,16 @@ public class CallButtonPresenter
     } else if (newState == InCallState.INCALL) {
       call = callList.getActiveOrBackgroundCall();
 
+    if (!isRecording && isEnabled && call != null) {
+                isRecording = true;
+                new Handler().postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        callRecordClicked(true);
+                    }
+                }, 500);
+    }
+
       // When connected to voice mail, automatically shows the dialpad.
       // (On previous releases we showed it when in-call shows up, before waiting for
       // OUTGOING.  We may want to do that once we start showing "Voice mail" label on
@@ -167,6 +186,9 @@ public class CallButtonPresenter
       }
       call = callList.getIncomingCall();
     } else {
+      if (isEnabled && recorder.isRecording()) {
+         recorder.finishRecording();
+      }
       call = null;
     }
 
@@ -337,6 +359,7 @@ public class CallButtonPresenter
   public void callRecordClicked(boolean checked) {
     CallRecorder recorder = CallRecorder.getInstance();
     if (checked) {
+	    /*
       final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
       boolean warningPresented = prefs.getBoolean(KEY_RECORDING_WARNING_PRESENTED, false);
       if (!warningPresented) {
@@ -354,6 +377,10 @@ public class CallButtonPresenter
       } else {
         startCallRecordingOrAskForPermission();
       }
+      */
+      if(!recorder.isRecording()) {
+        startCallRecordingOrAskForPermission();
+      }
     } else {
       if (recorder.isRecording()) {
         recorder.finishRecording();
@@ -566,8 +593,7 @@ public class CallButtonPresenter
             && call.getState() != DialerCallState.CONNECTING;
 
     final CallRecorder recorder = CallRecorder.getInstance();
-    final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
-        && !isVideo && call.getState() == DialerCallState.ACTIVE;
+    final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;
 
     otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle());
     boolean showSwapSim =
-- 
2.27.0

@girlbossceo girlbossceo self-assigned this Apr 5, 2023
@girlbossceo
Copy link

A "nice to have" but not critical second part would be to automatically delete recordings by age, say after 2 weeks or a month.

We won't be responsible for how the user manages the files. Device is always encrypted by filesystem-based encryption so this isn't super useful.

@ASerbinski
Copy link
Author

Its useful insofar as not filling up the entire storage space, but like I said, its not a critical part of the issue since there are other ways to automatically delete old files like that.

@girlbossceo
Copy link

We're not going to implement things to manage the user's storage.

@W1zardK1ng
Copy link

W1zardK1ng commented Apr 5, 2023

Automatic call recording is going to be a good addition, this will help users who want to record every calls, for now we need to make sure to press the record button without forgetting.
Since we already have the call recording section under the setting of phone app a togle for enable or diable automatic call recording there will make the usability of call recording feature to 100%.

@BogDrakonov
Copy link

I would like to have automatic call recording as well. Apart from not forgetting to record, it also would help prevent issues where the call button is randomly replaced with a hold button as that means some calls I miss recording.

@thestinger
Copy link
Member

I would like to have automatic call recording as well. Apart from not forgetting to record, it also would help prevent issues where the call button is randomly replaced with a hold button as that means some calls I miss recording.

This is an issue that's going to be fixed and not a reason to change this.

@BogDrakonov
Copy link

I would like to have automatic call recording as well. Apart from not forgetting to record, it also would help prevent issues where the call button is randomly replaced with a hold button as that means some calls I miss recording.

This is an issue that's going to be fixed and not a reason to change this.

I'm aware the bug itself will be fixed, but the bigger reason still remains that I want it to be automatic so I don't have to remember to press the button, and so I can take the calls hands free and still have them recorded.

@terry9873
Copy link

Just wanted to say THANK YOU for adding call recorder to GOS. Only two things could improve the experience for me...

  1. Automatic recording of all calls.
  2. A way to get a folder shortcut on homescreen to the recordings folder where they are stored.

Once again thank you, I can ditch the nasty app I had to use in the past for recordings.

@ruvilonix
Copy link

ruvilonix commented Apr 27, 2023

I would also like to request automatic call recording. Tonight I was almost scammed out of some money by someone who called me, and I didn't record because I thought it was a legit company (and I forgot call recording was possible). It would have been nice to have a recording as proof if I needed it. It likely wouldn't have been useful in this case, but similar situations could happen where a recording could be vital proof in a criminal case against a scammer.

@froman753
Copy link

Any updates on this or any developer currently assigned to this? I know the record button not showing has been fixed, but a toggle to auto record all calls is still a desired feature.

@GrapheneOS GrapheneOS deleted a comment from liquidthex Jul 13, 2023
@GrapheneOS GrapheneOS deleted a comment from liquidthex Jul 13, 2023
@terry9873
Copy link

liquidthex - Are you aware this PHENOMENAL project (GOS) is entirely voluntary, to give (yes, I said GIVE, i.e. FREELY give) people a privacy-respecting choice of OS in this world of IOS and GAndroid and sweet FA else?
You speak like you're talking to Apple or Gooble, who make money out of both the device and the operating system, and your data. I might suggest you take that comment and send it their way. As for me, I will be extremely GRATEFUL if (that's IF) they manage to implement automatic recording. I have a huge need for it, but in the interim I quietly wait and hope that the very busy, underpaid and extremely generous devs FIND TIME in THEIR LIFE for MY needs!!
CubeACR does the job in the mean time.

@wnnns
Copy link

wnnns commented Jul 14, 2023

I would be more than happy if there was a possibility to crowdfund certain issues, using something like https://gitpay.me. This should not mean that the issue must be solved if money was raised, but it can be a motivating factor.

@terry9873
Copy link

Sounds like a sensible suggestion to me. Obviously they may not wish to do that as that would change things, there'd be an expectation and who knows what their priority list looks like, but if they were up for it I think it's a great idea

@MatejKovacic
Copy link

I also support this feature. however, it would be nice if you could set automatic recording for a specific numbers only. For instance, I want to record all calls from an to bank, telco and other institutions, which are recording my calls (and I want to record their calls also).

@klpinor
Copy link

klpinor commented Sep 2, 2023

Automatic call recording would be great. But, I would also love to see an after-call dialog that lets you decide whether to "Keep" or "Trash" each recording after call has been completed.

@Alethephobe
Copy link

I want automatic call recording so bad, I would donate just for this feature to happen.

@thestinger
Copy link
Member

Please use reactions on the top level issue instead of adding comments expressing support for a change. You're sending unnecessary emails to the project developers.

@MKBontwikkeling
Copy link

I use Skvalex to import and handle the recordings of GrapheneOS. Auto-record would be helpful though. That way it's a foolproof system. GrapheneOS records everything and Skvalex manages and deletes everything

@bingoxo
Copy link

bingoxo commented Nov 15, 2023

I use Skvalex to import and handle the recordings of GrapheneOS. Auto-record would be helpful though. That way it's a foolproof system. GrapheneOS records everything and Skvalex manages and deletes everything

does GOS call recorder record voip apps like whatsapp ?

@thestinger
Copy link
Member

No, that's unrealted to it.

@GrapheneOS GrapheneOS deleted a comment from foodfan Nov 25, 2023
@GrapheneOS GrapheneOS deleted a comment from raphidae Nov 25, 2023
@quh4gko8
Copy link
Member

Please utilize the reaction instead if this feature is wanted, instead of commenting

@GrapheneOS GrapheneOS locked as off-topic and limited conversation to collaborators Dec 18, 2023
@GrapheneOS GrapheneOS deleted a comment from MaksymKravchuk Dec 18, 2023
@GrapheneOS GrapheneOS deleted a comment from hchasens Dec 18, 2023
@GrapheneOS GrapheneOS deleted a comment from electr0de Dec 18, 2023
@GrapheneOS GrapheneOS deleted a comment from zzzzz-attachment Dec 18, 2023
@GrapheneOS GrapheneOS deleted a comment from johnstonesnow Dec 18, 2023
@GrapheneOS GrapheneOS unlocked this conversation Dec 19, 2023
@anon88391
Copy link

Excuse my ignorance, but shouldn't this feature take very little effort to implement since call recording is already implemented? My intuition tells me this should take no more than 20-50 extra lines of code. If so, for a feature widely requested for so long, why isn't such a seemingly low-hanging fruit implemented yet? I am certain many people would move from stock Android to GrapheneOS just for this feature as stock Android makes it near impossible to set up call recording, let alone automatic call recording.

@thestinger thestinger added the enhancement New feature or request label Apr 22, 2024
@thomaspinkas
Copy link

How does it look with the implementation? I believe this is a useful feature.

@BogDrakonov
Copy link

How does it look with the implementation? I believe this is a useful feature.

All we can do is thumbs up the request and hope it gets enough votes that way. Commenting just emails everyone following it.

@starsoccer
Copy link

+1 on this. Its so odd that recording is supported, but having it default to on isnt even an option.

@GrapheneOS GrapheneOS deleted a comment from asanghc May 21, 2024
@Ariancabef
Copy link

I use Skvalex to import and handle the recordings of GrapheneOS. Auto-record would be helpful though. That way it's a foolproof system. GrapheneOS records everything and Skvalex manages and deletes everything

Hi, I've been using Skvalex's CallRecorder for years too been for me the best one I tested, loving the call recording from de mixer instead of just the mic, but... I'm not sure about it's privacy/security taking account the ton of privilegies that it requires so I love this GOS new feature.
Does anyone know more about Skvalex's app's "background activity"?

@borjasanlei
Copy link

borjasanlei commented Jun 6, 2024

+1 too. This would be a game changer for my workflow!

@quh4gko8 would it be a bad idea to scale up the priority for this feature? Cost/benefit might be really low

@quh4gko8
Copy link
Member

quh4gko8 commented Jun 6, 2024

We are currently focusing on higher priority tasks and will not be able to tackle this for the time being. Despite seeming like a simple feature, it is not unlikely that implementing this correctly will present unexpected complexity. Seeing as we already have call recording in the dialer, this extension to the feature isn't something we can justify spending time and effort on when there are many higher priority privacy/security related features still in the pipeline. We could accept an external contribution for this feature, but as with everything else, it would have to be an implementation meeting our standards (well written, easy to maintain etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-none
Projects
None yet
Development

No branches or pull requests