voxeet / voxeet-uxkit-cordova

Dolby.io UXKit for Cordova
Other
1 stars 14 forks source link

Dolby Voxeet Capacitor Cordova plugin Android call notification issue #72

Closed ActionalyDev closed 1 year ago

ActionalyDev commented 1 year ago

Describe the bug

When compiled with Capacitor on Android, the app/plugin does not open a call invitation screen/activity when the app is not active or in the background already.

Expected Behaviour

The call invitation screen or notification should appear when a call notification is received without having the app already opened.

Steps to Reproduce the Problem

"cordova-plugin-voxeet": "^1.5.6"

Our app uses ionic 5 and capacitor (v 2.4.4)

Our native android build is made with

minSdkVersion = 21 compileSdkVersion = 30 targetSdkVersion = 30

Specifications

"cordova-plugin-voxeet": "^1.5.6"

Our app uses ionic 5 and capacitor (v 2.4.4)

Our native android build is made with

minSdkVersion = 21 compileSdkVersion = 30 targetSdkVersion = 30

Dolby support ticket initial details

The plugin works well when the app is opened, it allows us to call someone and more importantly we see a small notification with “accept” and “dismiss” buttons when we receive a call. Clicking accept opens the call correctly.

Our issue happens when the app is not started (or was killed so not just in the background)

From our understanding at this point the plugin relies on firebase notifications for which we did set a firebase token in our dolby account settings. we also included the google-services.json in the build.

I can tell that the notifications work and are picked up by the voxeet plugin since I see in the phone logs

D/FirebaseProvider: New notification with body {...}

the body seems to include all the necessary information.

I also see this log

D/FirebaseProvider: notification managed := true

that comes from the file dolby_firebase_logs

com.voxeet.sdk\uxkit-firebase\3.1.1\89ffbdb44f2cc65bd934611c506bb371092e0697\uxkit-firebase-3.1.1-sources.jar!\com\voxeet\uxkit\firebase\implementation\VoxeetFirebaseMessagingService.java

So it seems like the Voxeet plugin is aware of the notification and managing it.

Following the trail, it calls getIncomingInvitation in the NotificationCenter class The issue is that it does not find an invitationProvider for the notificationMode “FULL_SCREEN_INCOMING_CALL” as the only provider in the hashmap is “NONE”

dolby_prodivers_only_none dolby_searching_fullscreen_mode_provider

jetified-push-3.1.1\jars\classes.jar!\com\voxeet\sdk\push\center\NotificationCenter.class

As a result, without a listener, onInvitationReceived does nothing.

dolby_no_listener

It seems like the VoxeetCordova class of the plugin is setting up the invitation providers by calling initNotificationCenter when the plugin initializes, but this step does not happen when the app is not launched.

As far as we know we followed the instruction to setup the plugin even though we are using Capacitor instead of Cordova.

Could you tell us if receiving a call whithout having the app launched is possible on android? (it works fine on ios)

If yes, do you see what could be missing in our setup? Do you need more information from us?

Regards,

codlab commented 1 year ago

This should be fixed in 1.5.7 delivered few minutes ago 👍