Laerdal / Xamarin.AzureCommunicationCalling

Xamarin iOS and Android binding libraries for Microsofts Azure Communication Services
MIT License
35 stars 11 forks source link

[Feature] PushNotification Android #33

Closed andersonvieiragomeslopes closed 2 years ago

andersonvieiragomeslopes commented 2 years ago

Hi, again.

I noticed that there is a lack of implementations for the push function on android, I did some tests here and I believe that this is the fix based on the official documentation/example.

Official example

public static void RegisterPushNotification(CallAgent callAgent, String deviceRegistrationToken) throws ExecutionException, InterruptedException {
        callAgent.registerPushNotification(deviceRegistrationToken).get();
    }
public static void UnRegisterPushNotification(CallAgent callAgent) throws ExecutionException, InterruptedException {
        callAgent.unregisterPushNotification().get();
    }
public static void HandlePushNotification(CallAgent callAgent, PushNotificationInfo pushNotificationInfo) throws ExecutionException, InterruptedException {
        callAgent.handlePushNotification(pushNotificationInfo);
    }
andersonvieiragomeslopes commented 2 years ago

@tompi Can you help with this item? This is really necessary so that the user can answer the cell phone with the screen off, I intend to do 3 more PR with items that are still missing from the list.

tompi commented 2 years ago

@andersonvieiragomeslopes please check if 2.3.0-beta.1.6 works as intended

andersonvieiragomeslopes commented 2 years ago

@tompi I think something went wrong with the plugin, the methods are not there.

image

tompi commented 2 years ago

@andersonvieiragomeslopes ooops, sorry, not sure what went wrong, should have tested... 2.3.0-beta.1.7 should fix it