How to call a user connected from multiple devices in ApiRTC? - webrtc

If I initialize the same user connected from multiple devices with the same apiCCId, when I try to call him, only one of the devices manages to start the call.
How can I deal with situation like that? Maybe I need to use JOIN / LEAVE room instead of calling.

If you have same user connected on multiple device, this user will receive call notification on all devices.
The first device where the call is accepted will make the call cancel on others devices (This is call forking).
You can check following tutorial to activate accept / refuse calls on apiRTC Client :
https://apirtc.com/tutos/Video_client_Material/apiRTC-Material-Client-Video-AcceptRefuse.html

Related

How to create and destroy a channel in Agora?

I'm making a mobile app for an audio chat like the clubhouse. Does anyone knows how to get existing rooms? In other words, how could you tell when a room is created and destroyed? I wonder if a channel is something like a river that constantly flows even without people in it.
that's an interesting question. Creating and destroying can be done in multiple ways which mainly depends upon your use case:
Pre-defined channels: If you want your users to join some existing channel itself then just pass the name of the channel to the joinChannel() method.
User can create their own channel: Process is still the same, in this case you just have to pass the channel name that the user gives as an input.
Further the process is simple the user calls the leaveChannel() method to drop off a particular call. And then the destroy() method releases all the Agora RtcEngine resources.

Apple Wallet Passes : Update Calls trigger

There are numerous articles on "how to implement update service" is already present. However, I have serious question below:
when will pass get updated technically? what is the trigger for updating?
When will be passbook's update service be called?
when update push notification is clicked by user
when pass is opened by user
silently done in background
when automatic update is off and user opens a pass
Please help
Pass updates can be initated in one of two ways:
The users does a pull-to-refresh on the pass.
You send a push notification to the device.
In the case of number 2, the device responds to the push notification by reaching out to the service specified by the pass's WebServiceUrl.
It sends the device identifier and pass type identifier. The web service is responsible for determining the passes that need updating and it returns a set of serial numbers. It does this by looking at the update tag and applies whatever mechanism makes sense for the pass.
The device will then request an updated pass for each of these serial numbers.
The process is described in far more detail in Apple's Documentation:
https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/PassKit_PG/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW1

Cumulocity tracker-agent stuck at "Start bootstraping"

I have trouble with one of my devices (Tracker dongle) communicating with Cumulocity. I used the Device Registration interface to register its IMEI. Then I accepted it in the same interface when it first connected. But now the tracker-agent I deployed is continually logging:
c.t.d.DeviceBootstrapProcessor : Start bootstrapping:
(DEVICE_IMEI)
And I got nothing arriving on Cumulocity. So I'm guessing it's stuck trying to retreive the device credentials? (Cf. DeviceBootstrapProcessor.tryAccessDeviceCredentials). I have another device of the same type which worcks just fine in the same configuration and I can't tell what's the difference between the two. Is there a step I'm missing to correctly register a device?
The tracker-agent has an additional registration for itself. It is once per tenant and automatically triggers after registering the first tracker device.
What you need to do is register the agent (via device registration) with the following ID:
tracker-agent-{tenant}
(replace {tenant} with the tenant you want do register the agent). This needs do be done once per tenant to allow the tracker agent to create devices and data.

CoreBluetooth on Mac ( OS X Yosemite) : Huge data receving delay after first time connection

I've got a strange problem using CoreBluetooth on Mac mini. By design, my code should receive a data update notification after discovering a characteristics service once it's connected. The problem is no data will be updated if a event is triggered by hardware within very first 20 seconds.
I've test the same code in the iOS,but it all works fine without any dealy. So the question is:
Does Apple delay the -[didUpdateValueForCharacteristic:] notification after first BLE connection?
In addition, I am using a custom profile ( A self defined UUID).
Thanks.
According to documentation:
This method is invoked when your app calls the
readValueForCharacteristic: method, or when the peripheral notifies
your app that the value of the characteristic for which notifications
and indications are enabled (via a successful call to
setNotifyValue:forCharacteristic:) has changed.
So no, it's not guaranteed that this method will be called after discovering a characteristic. You either have to call readValueForCharacteristic or subscribe to notifications and wait until peripheral sends a notification.
However, after discovering a characteristic, you can get its value in peripheral:didDiscoverCharacteristicsForService:error: method.

Sending Push notification from client - Worklight

I know that push notifications are being sent from a backend server. Is it possible to send notification from client itself? My application goes like this: It acquires its position using Location services API. once it enters a specific circle, the trigger calls a callback function. What i want to do is to use the callback function to push a notification to the device. Is there any way to do this?
Thank you very much in advance!
If you just want a notification when the app is active in the background, you can use local notifications: https://github.com/katzer/cordova-plugin-local-notifications. The plug-in Javascript has to be modified somewhat to work with a Worklight app, but with some simple modifications it works great, and allows your app running in the background to raise a notification without going through the server side round trip involved when using push.
That said, I implemented an app that did exactly what you are looking for (in my case, I needed some server side processing to figure out what the text of the push message should be) The geo-fence callback called an adapter, providing it with event details and the device ID. The adapter determined what message to send, and used unicast push to send it back to the device.
You can invoke a procedure in the client side. I tried to invoke in the client side with httpAdapter and its working.
If the notification doesn't need to come from the server, you can also create a service that will run in the background and show a dialogbox once it enters the geofence.