Code Monkey home page Code Monkey logo

flutter_callkit's People

Contributors

pe1ros avatar vladimirbrejcha avatar yuliagrigorieva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_callkit's Issues

MissingPluginException(No implementation found for method listen on channel plugins.voximplant.com/plugin_events)

The following MissingPluginException was thrown while activating platform stream on channel plugins.voximplant.com/plugin_events:
MissingPluginException(No implementation found for method listen on channel plugins.voximplant.com/plugin_events)

When the exception was thrown, this was the stack:
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)

#1 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:545:9)

Cannot invoke method afterEvaluate() on null object - ANDROID

I used to be able to run my app on android even if this package is not for android.
I upgraded Flutter to 2.10.1 and I started getting this error:
I tried also the last Flutter version and It did not work either

Plugin project :flutter_callkit_voximplant not found. Please update settings.gradle.

FAILURE: Build failed with an exception.

* Where:
Script '/Volumes/Data/Users/andres/Documents/DEV/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 470

* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
   > Cannot invoke method afterEvaluate() on null object

Flutter doctor:

[✓] Flutter (Channel stable, 3.0.1, on macOS 12.0.1 21A559 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
[✓] IntelliJ IDEA Community Edition (version 2021.3.2)
[✓] VS Code (version 1.67.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

Is anyone else getting this error when running on Android?

In background, FCXProvider not reporting incoming call.

In background mode when the application is considered active the application is not showing call kit on FCXProvider.reportNewIncomingCall(uuid, callUpdate).

When I open the application only then the CallKit is shown.

When the application is considered not active I am sending VoIP notification to PushKit which shows the native CallKit, what is the solution for this?

How to add a identifier from phone number list?

Hello,

I am a new Flutter developer and I have a list of phone numbers with their respective identifiers(ex: [+211231212343 - John]). I would like to know how to add the caller ID for these phone numbers. Furthermore, when a phone number from the list calls my phone, I want to display the caller's name along with their identifier. Can you help me with this?

Thank you very much.

Migrating to null safety

Flutter stable now supports sound null safety and this package has conflicts with uuid: ^3.0.1.

Is there a way to remove the uuid since it is only used in the example? Is it possible to move the uuid to dev_dependencies

didDisplayIncomingCall won't get called if app waken up from terminated state.

Hi, I'm using PushKit with VoIP push as your example:

# AppDelegate.swift
FlutterCallkitPlugin.sharedInstance.reportNewIncomingCall(
            with: uuid,
            callUpdate: callUpdate,
            providerConfiguration: configuration,
            pushProcessingCompletion: completion
        )

Everything works fine (didDisplayIncomingCall -> provider.performAnswerCallAction) . but when my app is closed and receive voip push, CallKit UI still showing but didDisplayIncomingCall callback didn't get call so i don't have enough information in onAnswerCallback.

Am I missing something ?

Example app not building

Hi there, thanks for maintaining the library!

I have issue with building the app for iPhone. I changed the bundle id, group id and team to my personal account. But when building the app following error occurs:

Ld /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Binary/Runner normal arm64 (in target 'Runner' from project 'Runner')
cd /Users/redacted/Projects/_redacted/flutter_callkit/example/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios10.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -L/Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Release-iphoneos -L/Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Release-iphoneos/flutter_callkit_voximplant -L/Users/redacted/Projects/_redacted/flutter_callkit/example/ios/Flutter -F/Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Release-iphoneos -F/Users/redacted/Projects/_redacted/flutter_callkit/example/ios/Flutter -filelist /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner_lto.o -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner.swiftmodule -ObjC -lflutter_callkit_voximplant -lPods-Runner -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner_dependency_info.dat -o /Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Binary/Runner

ld: warning: directory not found for option '-L/Users/redacted/Projects/_redacted/flutter_callkit/example/build/ios/Release-iphoneos/flutter_callkit_voximplant'
ld: library not found for -lflutter_callkit_voximplant
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you have any idea what might be the issue?

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.2, on macOS 11.2.2 20D80 darwin-x64, locale pl-PL)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.54.3)
[✓] Connected device (4 available)

• No issues found!

Instance member 'reportNewIncomingCall' cannot be used on type 'FlutterCallkitPlugin'; did you mean to use a value of this type instead?

Hi I get this Error in IOS. Please help

Instance member 'reportNewIncomingCall' cannot be used on type 'FlutterCallkitPlugin'; did you mean to use a value of this type instead?

Here is my app delegate.swift

import UIKit
import Flutter
import PushKit                     /* <------ add this line */
import flutter_voip_push_notification
import flutter_callkit_voximplant
import CallKit

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate, PKPushRegistryDelegate {
   // Handle incoming pushes
    func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
        // Process the received push
        FlutterVoipPushNotificationPlugin.didUpdate(pushCredentials, forType: type.rawValue);
    }
    
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    // if #available(iOS 10.0, *) {
    //   UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
    // }
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
    func pushRegistry(_ registry: PKPushRegistry,
                      didReceiveIncomingPushWith payload: PKPushPayload,
                      for type: PKPushType
    ) {
        processPush(with: payload.dictionaryPayload, and: nil)
    }

    func pushRegistry(_ registry: PKPushRegistry,
                      didReceiveIncomingPushWith payload: PKPushPayload,
                      for type: PKPushType,
                      completion: @escaping () -> Void
    ) {
        processPush(with: payload.dictionaryPayload, and: completion)
    }


    private func processPush(with payload: Dictionary<AnyHashable, Any>,
                             and completion: (() -> Void)?
    ) {
        // 3. get uuid and other needed information from payload
        guard let uuidString = payload["uuid"] as? String,
            let uuid = UUID(uuidString: uuidString),
            let localizedName = payload["callerName"] as? String
            else {
                return
        }
        // 4. prepare call update
        let callUpdate = CXCallUpdate()
        callUpdate.localizedCallerName = localizedName
        // 5. prepare provider configuration
        let configuration = CXProviderConfiguration(localizedName: "JPAL")
        // 6. send it to the plugin
        FlutterCallkitPlugin.reportNewIncomingCall(
            with: uuid,
            callUpdate: callUpdate,
            providerConfiguration: configuration,
            pushProcessingCompletion: completion
        )
    }
}

Timeout after call: [[FlutterCallkitPlugin sharedInstance] reportNewIncomingCallWithUUUID]

Hello!
Everything is super, your plugin works perfectly with all the necessary methods in Flutter.
But according to Apple specification reportNewIncomingCallWithUUUID should be called when VoIP push comes, which you have perfectly implemented.

But if the user doesn't accept the call and reject it, the call lasts forever.

Could you add an additional endCall method to your plugin (in the native part) that would end the call with a specific uuid and we would call it at a given timeout. It would be awesome if this method would run through all current calls (like in your hasCallWithUUID method) and end only unanswered calls.

--- RUS ---

Здравствуйте!
Все супер, ваш плагин отлично отрабатывает все необходимые методы во Flutter.
Но по спецификации Apple reportNewIncomingCallWithUUUID должен вызываться по приходу VoIP пуша, что вы замечательно и реализовали.

Но если пользователь не примет вызов и не отклонит его, то звонок длится вечно.

Вы не могли бы добавить в ваш плагин (в нативную часть) дополнительный метод endCall, который бы завершал вызов с определенным uuid, а мы бы вызывали его по заданному таймауту. Было бы просто супер, если бы этот метод пробегал бы по всем текущим вызовам (как в вашем методе hasCallWithUUID) и завершал бы только неотвеченные вызовы.

Call Not Ended

[FlutterCallKit:ERROR > [ERROR_UNKNOWN_CALLUUID: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 4.)]]

After one munite on the call I get FCXProvider.timedOutPerformingAction.

Here are logs:
flutter: [FlutterCallKit:INFO > FCXProvider.timedOutPerformingAction]
flutter: [FlutterCallKit:INFO > FCXCallObserver.callChanged: 32393681-B759-49C4-9D8A-67A656F4EE7B]
flutter: [FlutterCallKit:INFO > FCXProvider.executeTransaction]
flutter: [FlutterCallKit:INFO > FCXTransaction.getActions]
flutter: [FlutterCallKit:INFO > FCXProvider.FCXEndCallAction]

I can't find a place to manage timeout duration. FCXEndCallAction makes my call close down.
Help please!

How to pass information from didDisplayIncomingCall to Flutter app?

I am using this plugin to successfully trigger the CallKit ringing UI upon receiving a PushKit voip notification.

This plugin says to handle the incoming call using the FCXPlugin.didDisplayIncomingCall field in Dart. Answering the call launches the Flutter app UI, but the FCXPlugin.didDisplayIncomingCall function never runs. Interestingly the performAnswerCallAction does run.

I have been unsuccessful in passing information from that function into the Flutter app. I have tried writing and flushing it to disk, as well as SharedPreferences, but the data doesn't appear to be written upon app launch, it is only available in subsequent app launches. I am pretty confused. What is the suggested approach here?

Plugin version: 2.0.2+2

Flutter doctor output
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale en-AU)
    • Flutter version 2.10.5 at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (4 weeks ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/jaween/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.67.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (3 available)
    • Jaween’s iPhone (mobile) • 02669b794c29bb14a717a3d0987dc6c5c116d819 • ios            • iOS 15.4.1 19E258
    • macOS (desktop)          • macos                                    • darwin-x64     • macOS 12.3.1 21E258 darwin-x64
    • Chrome (web)             • chrome                                   • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

MissingPluginException

MissingPluginException(No implementation found for method CallController.configure on channel plugins.voximplant.com/flutter_callkit)

calluuid and uuid in FCXAnswerCallAction

where are there two uuids in FCXAnswerCallAction?

when a server send a voip notification to a device with uuid = "X", plugin.didDisplayIncomingCall gets called with uuid = "X". when a user performs answer or end, a callback gets called with callUuid = "X" and uuid = "something else".

what is uuid in FCXAnswerCallAction or FCXEndCallAction and how is it generated? and why is uuid from plugin.didDisplayIncomingCall renamed to callUuid in FCXAnswerCallAction?

Feature request: Android SDK implementation

This is a really useful package and would greatly help me in my current flutter project. But unfortunately, I need this for android devices. I would really appreciate it if this is made for android SDK as well since a lot of other people may also benefit.

callUUID are always uppercase

It looks like CallKit will uppercase any UUID i send from the server. I had to lowercase all the UUIDs when sending them back to the server.
I assume it is swift that is doing that transform. Is this correct? If so, this should probably be documented.

UUID(uuidString: callUUID)

How to create an outgoing call from the recent calls list.

Thank you very much for the great implementation of the plugin. Beautiful clean code. I really like it.
I still have one problem: I can't figure out how to get the event that occurs when I click on the last calls list item in my phone? This list includes all my voip calls that were made through my app using your plugin (were registered in CallKit).
Clicking on the saved call just opens my app, and I would like to initiate an outgoing call (audio or video, depending on the previous call) in my app.

rus:
Спасибо, большое за отличную реализацию плагина. Красивый чистый код. Мне очень нравится.
У меня осталась одна проблема: я не могу понять, как получить событие, возникающее при нажатии на элемент списка последних звонков в телефоне? В этот список попадают все мои voip вызовы, которые были осуществлены через мое приложение с использованием Вашего плагина (были зарегистрированы в CallKit).
При нажатии на сохраненный вызов просто открывается мое приложение, а мне бы хотелось инициировать в своем приложении исходящий вызов (аудио или видео, в зависимости от предыдущего вызова).

Question: SIP VoIP Application with Voximplant CallKit

I have an application that I have developed using the dart-sip-ua package with the Asterisk FreePBX server in the backend. Specifically for iOS development, I am using the Voximplant call kit.

I have copied the call service from example this package and implemented it in the application. The problem is that, how do you manage the CallKit in the background?

I am also using Apple Server on the Production environment for sending VoIP Push to the apple device id.

VoIP call

Hi, thanks for good lib, I need help with voip and incoming call, where am I need to put didDisplayIncomingCall function to receive call when app is closed? I checked example but didn't found anything related to that

Call Processing on Locked Screen

Hello.
Tell us how to make the application on Flutter run when the phone is locked?
After the user made a pile on the slider and worked out the method "performAnswerCallAction".
In my case, if the phone is not locked, then even if the application is killed from memory, after the answer to the call the application will start and process the incoming call.
All processing is based on WebRTC technology and written in Flutter.
But if the phone is locked, then after the answer to an incoming call the only way to start the application is to press the custom button, enter the unlock code of the screen and only then the application will start.
Is it possible to start the application somehow in the background in the "performAnswerCallAction" handler or even earlier in the "didReceiveIncomingPushWithPayload" handler?

Where do I put handleIncomingCall method

where will I put the handleIncomingCall method to handle calls when I get voip pushes
Future handleIncomingCall(String contactName, String uuid) async {
FCXCallUpdate callUpdate = FCXCallUpdate(localizedCallerName: contactName);
await _provider.reportNewIncomingCall(uuid, callUpdate);
}

Caller Identification

First of all, many thanks for your effort in this library!

It's possible to identify the caller number (from landline or mobile number) or CallKit only works for voip applications?

Thank you

iOS 16 CallKit closes after 60 seconds

On iOS 16 devices, CallKit closes after 60 seconds.
In previous versions of iOS (14, 15), it could be displayed for 90 seconds, and then we closed it by ourselves.
We have tried other packages for CallKit, but they still have the same issue.
Have anyone faced the same issue and knows how to bypass it?

UPD: logs that we get when CallKit is finished

flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXProvider > executeTransaction
flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXTransaction > getActions
flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXProvider > FCXEndCallAction
flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXProvider > reportCallEnded
flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXEndCallAction > fulfill
flutter: [[FlutterCallKit.INFO](http://fluttercallkit.info/)] FCXCallObserver > callChanged

I assume, that we are getting declined events from the system.

voip token

How to get token to call through voip service?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.