Search code examples
iossinch

Call Sinch Callkit project from Android?


We're currently used Sinch with Callkit. It work fine for iOS to iOS call but when we try Android to iOS it doesn't work.

Is there any requirement on Android side to be implement in order to work with Callkit?

Thank you,


Solution

  • There is no additional implementation required on the Android part to make the CallKit App work on a called iPhone.

    If you make a breakpoint in the following method of the CallKit app:

    - (void)managedPush:(id<SINManagedPush>)unused
        didReceiveIncomingPushWithPayload:(NSDictionary *)payload
                                  forType:(NSString *)pushType {
      [self handleRemoteNotification:payload];
    }
    

    and make a call to initiate a push from the Android app, is this callback triggered, and do you catch the payload?

    If yes, please check if your clocks on your Android phone and iPhone are synced, the Sinch SDK will discard a too old (1 min old) push notification, in order to not show an expired notification for an invalid incoming call.

    It currently relies on the clocks of the devices to do this (with the assumption that nowadays almost every phone has its clock synced via its network). The phone with its clock more than 1 min behind (both converted to UTC) will not be able to call the other phone via push notification. So please check the clock too.