Giter VIP home page Giter VIP logo

flutter_callkeep's Issues

Android 14 - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified

I am getting this error on Android 14 device when I click on incoming call to make it full screen.

E/AndroidRuntime( 2686): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.buddy.dev/co.doneservices.callkeep.IncomingCallActivity}: java.lang.SecurityException: com.buddy.dev: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
E/AndroidRuntime( 2686): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164)
E/AndroidRuntime( 2686): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
E/AndroidRuntime( 2686): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
E/AndroidRuntime( 2686): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
E/AndroidRuntime( 2686): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
E/AndroidRuntime( 2686): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
E/AndroidRuntime( 2686): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 2686): at android.os.Looper.loopOnce(Looper.java:230)
E/AndroidRuntime( 2686): at android.os.Looper.loop(Looper.java:319)
E/AndroidRuntime( 2686): at android.app.ActivityThread.main(ActivityThread.java:8918)
E/AndroidRuntime( 2686): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2686): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
E/AndroidRuntime( 2686): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Getting missing plugin exception for iOS

Steps to reproduce

  • Create a new flutter project
  • Install the flutter_callkeep package
  • Paste the code given in example code
  • Run the app

Expected Behavior

The app should setup and be able to trigger the call functionality successfully

Actual Behavior

Flutter throws a MissingPluginException(No implementation found for method setup on channel co.doneservices/callkeep) exception

Version Information

  • flutter_callkeep: 0.1.8
  • flutter: 1.17.2
  • xcode: 11.5

Other workarounds

  • Tried commenting the setup function and directly accessed displayIncomingCall but the same exception is thrown for this method call as well
  • Tried downgrading the package version to 0.1.7 but still not working
  • Upgraded flutter to the latest version (1.17.2) and tried and still not working
  • Tried this package on Android and it is working fine as expected

Hoping for a quick response. Thank you

Nothing happens

I ran the example, click the button, gave permission and nothing happens.

unable to run example project

unable to run the app getting the following error.

using flutter_callkeep: ^0.3.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:/Users/imsaharukh/Dev/munchies/munchies_rider/build/flutter_callkeep/intermediates/packaged_res/debug/layout/activity_call_incoming.xml:7: AAPT: error: resource color/done_purple (aka com.now.munchies_rider:color/done_purple) not found.

     ERROR:/Users/imsaharukh/Dev/munchies/munchies_rider/build/flutter_callkeep/intermediates/packaged_res/debug/layout/activity_call_incoming.xml:24: AAPT: error: resource string/callHeader (aka com.now.munchies_rider:string/callHeader) not found.

     ERROR:/Users/imsaharukh/Dev/munchies/munchies_rider/build/flutter_callkeep/intermediates/packaged_res/debug/layout/activity_call_incoming.xml:45: AAPT: error: resource string/answer (aka com.now.munchies_rider:string/answer) not found.

     ERROR:/Users/imsaharukh/Dev/munchies/munchies_rider/build/flutter_callkeep/intermediates/packaged_res/debug/layout/activity_call_incoming.xml:60: AAPT: error: resource string/decline (aka com.now.munchies_rider:string/decline) not found.

full example

Please give us a FULL example on how to handle notifications and native activities. Thanks

add action if answer or decline in displayIncomingCall

how can add action

if answer
Navigator.push(context, MaterialPageRoute(builder: (context)=>AnswerPager()));
if decline
Navigator.push(context, MaterialPageRoute(builder: (context)=>DeclinePager()));
if dontanswer
Navigator.push(context, MaterialPageRoute(builder: (context)=>DeclinePager()));

even the application in background

i use
await CallKeep.displayIncomingCall( callUUID, number, number, HandleType.number, true);

Screenshot_1592502665

Full screen not working

Hi, you wrote this below a year ago. However, I tried it, and I expected a full screen native activity to appear when a background FCM notification is received but it just shows the normal drop-down notification and you have to tap on a button to see the full screen native activity.

How can a full screen activity be displayed when a background FCM notification is received? Thanks

Your message:

  • Add the full screen intent permission
  • Add the activity to the Android Manifest:

    <activity
         android:name=".IncomingCallActivity"
         android:exported="true"
         android:showOnLockScreen="true" />
    
  • Build the activity that will be showed when displaying the call. I used Android Studio for this.

public class IncomingCallActivity extends Activity ...

  • Trigger showing the screen, this can be done from a background isolate (e.g. Firebase handleBackgroundMessage as well!)

    await CallKeep.displayCustomIncomingCall(
    'com.yourcompany.yourapp', // Change this
    'IncomingCallActivity',
    icon: 'notification_icon', // Make sure you have this icon in your assets
    extra: <String, dynamic>{
    // Here you can pass any key value pairs that you can read using getIntent().getStringExtra("key") in the native activity
    },
    )

Does it work on iOS?

Hello everyone, am really interested in this package and I see it's very promising. but does it work at the moment with iOS?

call gets dismissed in 30 secs

the duration parameter is not working. I want to set that the call should gets dismissed after two seconds but it is getting dismissed in just 30 secs

iOS launch when VoIP push notification sent

When the app has been terminated either by the user from the app switcher or by the OS itself (normally power saving or memory) and then call comes in the VoIP push notification is sent. This results in the phone itself displaying a crash dialog that is then reported to TestFlight. Inspection of the crash indicates that the push notification has not been handled.

If my app is running, whether in the foreground or the background (not terminated), it all works and CallKit is called, the native interface for answering a call is displayed. The call can be answered in the normal way.

From the crash report it says the crash occurred in Thread 0 and it sort of looks like it tried to start the app. Is this something that works but there is something I should be aware of that I either should or should not do?

thanks
Matthew

not working with fcm background mode

what I will do if my app is in background mode or killed or screen lock I want something like WhatsApp calling features please help someone to make it. I am getting this error when the app is in background

E/MethodChannel#co.doneservices/callkeep( 4983): Failed to handle method call
E/MethodChannel#co.doneservices/callkeep( 4983): kotlin.KotlinNullPointerException
E/MethodChannel#co.doneservices/callkeep( 4983): at co.doneservices.callkeep.CallKeep.hasPhoneAccount(CallKeep.kt:63)
E/MethodChannel#co.doneservices/callkeep( 4983): at co.doneservices.callkeep.CallKeep.displayIncomingCall(CallKeep.kt:182)
E/MethodChannel#co.doneservices/callkeep( 4983): at co.doneservices.callkeep.CallKeep.onMethodCall(CallKeep.kt:72)
E/MethodChannel#co.doneservices/callkeep( 4983): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/MethodChannel#co.doneservices/callkeep( 4983): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/MethodChannel#co.doneservices/callkeep( 4983): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/MethodChannel#co.doneservices/callkeep( 4983): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#co.doneservices/callkeep( 4983): at android.os.MessageQueue.next(MessageQueue.java:329)
E/MethodChannel#co.doneservices/callkeep( 4983): at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#co.doneservices/callkeep( 4983): at android.app.ActivityThread.main(ActivityThread.java:6375)
E/MethodChannel#co.doneservices/callkeep( 4983): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#co.doneservices/callkeep( 4983): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
E/MethodChannel#co.doneservices/callkeep( 4983): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
E/flutter ( 4983): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, null, null)
E/flutter ( 4983): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter ( 4983): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter ( 4983):
E/flutter ( 4983): #2 CallKeep.displayIncomingCall (package:flutter_callkeep/flutter_callkeep.dart:181:20)
E/flutter ( 4983): #3 _SplashScreenState.displayIncomingCall (package:camiotalk/pages/splash_page.dart:197:20)
E/flutter ( 4983): #4 myBackgroundMessageHandler (package:camiotalk/pages/splash_page.dart:29:26)
E/flutter ( 4983): #5 _fcmSetupBackgroundChannel. (package:firebase_messaging/firebase_messaging.dart:38:30)
E/flutter ( 4983): #6 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
E/flutter ( 4983): #7 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:370:54)
E/flutter ( 4983): #8 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
E/flutter ( 4983): #9 _invoke3. (dart:ui/hooks.dart:303:15)
E/flutter ( 4983): #10 _rootRun (dart:async/zone.dart:1126:13)
E/flutter ( 4983): #11 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter ( 4983): #12 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
E/flutter ( 4983): #13 _invoke3 (dart:ui/hooks.dart:302:10)
E/flutter ( 4983): #14 _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
E/flutter ( 4983):

The plugin doesn't work on any function

I'm using the plugin on android ,
when i call the method displayIncomingCall() it doesn't show any result,
when i use the then callback after displayIncomingCall() it returns value but doesn't show any thing on the screen.

hasPhoneAccount() - App Crash

there is a problem with the hasPhoneAccount method channel, wherein the app crash when I ask for permissions..
Can someone resolve these issues.

java.lang.IllegalArgumentException: Drawable resource ID must not be 0

java.lang.IllegalArgumentException: Drawable resource ID must not be 0
W/System.err(22156): at androidx.core.graphics.drawable.IconCompat.createWithResource(IconCompat.java:254)
W/System.err(22156): at androidx.core.graphics.drawable.IconCompat.createWithResource(IconCompat.java:242)
W/System.err(22156): at co.doneservices.callkeep.CallKeepNotificationManager.showIncomingNotification(CallKeepNotificationManager.kt:132)
W/System.err(22156): at co.doneservices.callkeep.CallKeepBroadcastReceiver.onReceive(CallKeepBroadcastReceiver.kt:109)
W/System.err(22156): at android.app.ActivityThread.handleReceiver(ActivityThread.java:4544)
W/System.err(22156): at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
W/System.err(22156): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2273)
W/System.err(22156): at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err(22156): at android.os.Looper.loopOnce(Looper.java:211)
W/System.err(22156): at android.os.Looper.loop(Looper.java:300)
W/System.err(22156): at android.app.ActivityThread.main(ActivityThread.java:8232)
W/System.err(22156): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(22156): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
W/System.err(22156): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)

iOS Voip notifications not received [No implementation found for method displayIncomingCall]

flutter: Awesome Notifications FCM: An error occurred in your background messaging handler:
flutter: MissingPluginException(No implementation found for method displayIncomingCall on channel flutter_callkeep)

this logs when receive the ios voip notifications and the notifications not displayed, it was working and without any changes the app crashing when the notifications come on background mode, so i updated the package for 1.0.0 and now it dosn't working

Support for Flutter 2.0

Does this plugin support the newest version of Flutter?
I upgraded my project and now I have 2.0.6.
Since that moment I can't receive call when an app (android version) is not launched or in backgraound.

IOS Platform Error: flutter_callkeep/SwiftCallKeepPlugin.swift:152: Fatal error: Unexpectedly found nil while unwrapping an Optional value

My code:
final callKeepBaseConfig = CallKeepBaseConfig(
appName: 'Done',
androidConfig: CallKeepAndroidConfig(
logo: 'ic_launcher',
notificationIcon: 'ic_launcher',
accentColor: '#34C7C2',
),
iosConfig: CallKeepIosConfig(
iconName: 'Icon',
maximumCallGroups: 1,
handleType: CallKitHandleType.generic
),
);
final config = CallKeepIncomingConfig.fromBaseConfig(
config: callKeepBaseConfig,
uuid: call.id!,
contentTitle: call.remote_display_name,
hasVideo: false,
handle: call.direction,
callerName: "HIHI",
extra: {"data1":"ddwwd","data2":'dwqddddd'},
);
await CallKeep.instance.displayIncomingCall(config);

When I run app in real device ios platform, i got a message:
flutter_callkeep/SwiftCallKeepPlugin.swift:152: Fatal error: Unexpectedly found nil while unwrapping an Optional value
flutter_callkeep/SwiftCallKeepPlugin.swift:152: Fatal error: Unexpectedly found nil while unwrapping an Optional value

  • thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value
    frame #0: 0x000000019fa7ca3c libswiftCore.dylib_swift_runtime_on_report libswiftCore.dylib:
    -> 0x19fa7ca3c <+0>: ret
    libswiftCore.dylib: 0x19fa7ca40 <+0>: b 0x19fa7ca3c ; _swift_runtime_on_report libswiftCore.dylib:
    0x19fa7ca44 <+0>: adrp x8, 366325
    0x19fa7ca48 <+4>: ldrb w0, [x8, #0x994]
    Target 0: (Runner) stopped.`

What should I do?

MissingPluginException (MissingPluginException(No implementation found for method setup on channel co.doneservices/callkeep))

Xcode build done. 29.4s
[VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method setup on channel co.doneservices/callkeep)
#0 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:159

#1 MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:334
#2 CallKeep.setup
package:flutter_callkeep/flutter_callkeep.dart:112

null safety support

Hey, is there a way that you could add null safety support? My app doesn't want to start due to:

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

 - package:flutter_callkeep

iOS outbound call timer not working

Hello

I'm using sip_ua and if I place a call it then provides a callback to say the call is initiating. At this point I call startCall on flutter_callkeep. If I then return to the home screen I will the dynamic island has a call in progress but the timer will still be a zero.

I added the flutter_callkeep a call to sharedProvider?.reportOutgoingCall in CallKit which I call when the call has been answered, however this does not result in the timer being started either. When going to the native phone screen it seems that CallKit thinks the call is still in the connecting phase.

From what I can see in the readme and the example there is only a call to startCall. Am I missing some other step?

I also added in an update call for iOS as for inbound calls the server does not send me the caller's name and so I need to do a local lookup after flutter_callkeep has signalled the incoming call to CallKit. This works well and updates with the name I find in my lookup.

How to fetch the incoming call number.

Hi @MrAlek @LinusU @yukitaka13-1110 I simply want to fetch the incoming call number and show the customized native UI for incoming calls with a pop notification from my app that show another message but I can't find it in your documentation. Can you help me with how to get the incoming number on both Android and iOS?

PlatformException(E_ACTIVITY_DOES_NOT_EXIST, ConnectionService not available for this version of Android., null, null)

When I click on display incoming call. I get the following error

E/flutter ( 9687): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(E_ACTIVITY_DOES_NOT_EXIST, ConnectionService not available for this version of Android., null, null)
E/flutter ( 9687): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:581:7)
E/flutter ( 9687): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
E/flutter ( 9687): <asynchronous suspension>
E/flutter ( 9687): #2      CallKeep._hasPhoneAccountPermission (package:flutter_callkeep/flutter_callkeep.dart:157:12)
E/flutter ( 9687): <asynchronous suspension>
E/flutter ( 9687): #3      CallKeep.askForPermissionsIfNeeded (package:flutter_callkeep/flutter_callkeep.dart:127:30)
E/flutter ( 9687): <asynchronous suspension>
E/flutter ( 9687): #4      MyApp.displayIncomingCall (package:callkeep_example/main.dart:13:5)
E/flutter ( 9687): <asynchronous suspension>
E/flutter ( 9687): 
D/GraphicBuffer( 9687): register, handle(0x7f53cbae80) (w:720 h:1184 s:720 f:0x1 u:0x000b00)

[Android]: Function CallKeep.instance.endAllCalls(); not working when app in lockscreen

When app in lock screen. I used push notification to show callkit in android. After that, I pushed other notification to cancel call.

Expected results

  • Remove notification.
  • Remove call screen in lock screen.

Actual results

  • Remove notification.
  • Call screen in lock screen not remove.

Device Information

  • Samsung galaxy A32.
  • OS: Android 14.

Screenshots or Video

IMG_0817.MOV

Thank you for your support.

Outgoing call

hi thankyou for the great work. can i make the call by using the same plugin if do so what changes i have to do. kindly help me in this thanks

Incoming call notification customization

Is there any way to customize the incoming call notification's button colors?
For me they are both white, I'd like one to be red and another to be green.
The only customization that I found was the accentColor property of CallKeepAndroidConfig but it only changes text color of these buttons.
Screenshot 2024-02-15 at 19 50 10

Agora flutter sdk audio stream doesn't work when call ui is displayed

Hi, i'm trying to develop a audio call app using agora sdk and i use this package to display incoming call. Displaying incoming call works perfectlly but when the call is displayed the agora audio stream does'nt work if i close the incoming call the agora audio works . How can i use this package with agora?

Display custom incoming call

Hi there!

If my app is in background mode and I get callkeep notification, can I go back to foreground(like local notification does on user interactions). As I see there is backToForeground for Android. What about IOS? Is displayCustomIncomingCall feature can do it?) If yes - could you please provide an example

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.