1

I am working with an android application, where I am implementing sinch sdk to enable voice/video feature to my app. Is there any way to send custom data with call. Below is my code for sending header with call. But I am receiving empty header on incoming call.

HashMap map = new HashMap(); map.put("appintment_key", "vikas"); Call call = getSinchServiceInterface().callUserVideo(userName,map);

Cœur
  • 37,241
  • 25
  • 195
  • 267
vickyVick
  • 207
  • 3
  • 14

1 Answers1

1

To receive calls when the app is killed you need to enable push with GCM, check out the managedpush section in the docs https://www.sinch.com/docs/voice/android/#pushnotifications

To send custom data, do a callUser with headers allUser(String toUserId, Map headers)

cjensen
  • 2,703
  • 1
  • 16
  • 15
  • I am putting header when i place a call Call call = getSinchServiceInterface().callUserVideo(userName); call.getHeaders().put(userName,new HashMap().put("appintment_key","vikas")); and getting this header when call receive Log.d(TAG, call.getHeaders().toString()); but i am getting empty headers. – vickyVick Jan 07 '16 at 06:58
  • you need to use callUser(String toUserId, Map headers) to set headers – cjensen Jan 08 '16 at 04:55
  • still i am receiving empty headers on incoming call – vickyVick Jan 08 '16 at 05:16
  • 2
    @cjensen I have the same issue as user3351125. When using managed push, the headers somehow get lost. When I am listening on the active connection, I receive the headers in the call. When I'm not listening, so when I only use push, I get the call but without headers. – Inneke De Clippel Feb 12 '16 at 10:24