I have implemented Sinch APIs in my app, but i am not able to " log out " or switch between 2 users on the same device. the "logged out" user keep receiving incomming call( but not able to answer ) even I use unregisterManagePush() method. I made a query on Sinch's support page. But the support team told me to read the docs again. But I did exactly what the docs says.this is my code:
if (MyFirebaseMessaging.sinchClient!=null) {
MyFirebaseMessaging.sinchClient.stopListeningOnActiveConnection();
MyFirebaseMessaging.sinchClient.unregisterManagedPush();
MyFirebaseMessaging.sinchClient.terminateGracefully();
MyFirebaseMessaging.sinchClient=null; }
UPDATE 1: CODE I HAVE TRIED
if (MyFirebaseMessaging.sinchClient!=null) {
MyFirebaseMessaging.sinchClient.stopListeningOnActiveConnection();
MyFirebaseMessaging.sinchClient.unregisterManagedPush();
MyFirebaseMessaging.sinchClient.terminateGracefully();
}
if (MyFirebaseMessaging.sinchClient!=null) {
MyFirebaseMessaging.sinchClient.stopListeningOnActiveConnection();
MyFirebaseMessaging.sinchClient.unregisterManagedPush();
MyFirebaseMessaging.sinchClient.terminate();
MyFirebaseMessaging.sinchClient=null; }
if (MyFirebaseMessaging.sinchClient!=null) {
MyFirebaseMessaging.sinchClient.stopListeningOnActiveConnection();
MyFirebaseMessaging.sinchClient.unregisterManagedPush();
MyFirebaseMessaging.sinchClient.terminate();
}
=> They are all dose not work at all. Sinch keep call the previous user who logged out.