Flutter based call recording app with native UI integration
Asked Answered
L

1

15

I am trying to get call-recording to work with native UI integration using flutter, CallKit (iOS) and ConnectionService (Android).

Since there is no guide for integrating flutter with CallKit and ConnectionService or any other service to enable system-like call recording without root access or jailbreak, this question has come to existence. There are a lot of apps available for jailbroken devices and android does natively support call recording, but there is no concrete guide for implementing the same using flutter.

Using flutter 1.7 with AndroidX support for back-compatibility of marshmallow+ ConnectionService.

The expected result is to automatically record calls or prompt user to do so whenever there is an incoming call.

Currently unable to do it at all, maybe I am missing something essential in the documentation or I don't have the sufficient know-how for the successful execution of creating a system-supported call-recording app using flutter.

Lagoon answered 14/7, 2019 at 12:34 Comment(3)
flutter.dev/docs/development/platform-integration/…Podagra
It is going to be hard to replicate apps which do have native call recording functionality on Flutter. The apps that do have call recording functionality enabled on native Android by itself is done after extensive development. You will essentially be writing platform integration code over an already hard to implement feature. What I would suggest as a starting point is to first try the native version first and then think about replicating it on flutter. By all means, don't take this as a discouragement but knowing what you are getting involved with natively first will help you out.Sanies
I understand the difficulty involved in the process, hence wished for some of the brightest and more experienced minds to help me attain what is not documented yet.Lagoon
B
4

Since there is no guide for integrating flutter with CallKit and ConnectionService ...

In short, mentioned via comments, you’ll have to refer to https://flutter.dev/docs/development/platform-integration/platform-channels to do it yourself by implementing platform-specific code such as CallKit/ConnectionService.

First, because there’s currently likely no Flutter library that has already conveniently packaged this up for you, at least not at https://pub.dev/flutter, so this is why you need to do it yourself.

Now, assuming all the restrictions, permissions, rooting, jailbreaking, etc. poses no issue to you, then you would need to implement these APIs natively in iOS/Android first, for example, Android:

@Override
public void onMethodCall(MethodCall call, Result result) {
    if (call.method.equals("recordCall")) {
        result.success(recordCall());
    }
}

Which will then allow you to call them from Flutter:

_recordCall() {
  var recording = await platform.invokeMethod('recordCall');
}

So don’t think of how to do this in Flutter, the above was the easy part.

Your perspective should be: how to do this on iOS/Android, because the magic is in recordCall()

Bushweller answered 22/11, 2019 at 23:44 Comment(1)
MOre like creating a library on itDiabolic

© 2022 - 2025 — McMap. All rights reserved.