Apple Wallet Passes : Update Calls trigger - passbook

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

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.

Prevent device notification client side with React Native Firebase when a FCM notification arrives (based on user preferences)

I'd like to know if there any a way to prevent the device display a notification when a FCM message with a notification arrives, in case the user has decided to mute notifications and only have them arrive silently (making them act as data only messages, but being notification messages). I imagine like, in the handler/callback call a method to prevent the device notification and do extra processing afterwards.
I know I can use data only messages, but that approach would be harder since I must use multiple topics or token lists and somewhat more backend logic to achieve that.
Thanks
If the message contains a notification property, it is automatically handled by the OS when the app is not active. There is nothing you can do to prevent that.
As you said: if the message only contains a data property, it is always passed to your code for handling, and you can decide what to do with it. So that's the way to go if you want full client-side control over whether a notification is displayed for a message.

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.

NServiceBus, NHibernate, and GuidComb()

Disclaimer: This is a follow-on question from my other question about NServiceBus which was answered very thoroughly.
My current question is this: If a website is built to be 'dumb' like the article referred to, above, suggests then how does the following scenario work?
A user registers on a website by filling out a form with relevant details. When the user clicks the 'submit' button on the form the web application takes the form data and creates a message which it sends to the application tier using NServiceBus and Bus.Send(). The application tier goes about the business of creating the new user and publishing the event that the user has been created (Bus.Publish()) so that other processes can do their thing (email the new user, add the user to a search index, etc, etc).
Now, since the web application in this scenario relies entirely on the application tier for the creation of the new user instance, how does it get to know about the user's id? If I didn't use NServiceBus in this scenario but, rather, let the website issue an in-process call to a DAL I'd use NHibernate's GuidComb() strategy to create the identifier for the new user before persisting the new row in the database. If the message handler application which receives the command to create a new user (in the current scenario) uses the same strategy, how is the userId communicated back to the web application?
Do I have to apply a different strategy for managing identifiers in a scenario such as this?
You're free to come up with an ID to use as a correlation identifier by putting it in your message in the web application, allowing it to be carried around whatevery processes are initiated by the message.
That way, you can correlate the request with other events around your system, if only they remember to supply the correlation ID.
But it sounds like you want your user ID to be fed back to you in the same web request - that cannot easily be done with an asynchronous backend, which is what messaging gives you.
Wouldn't it be acceptable to send an email to the user when the user has been created, containing a (secret) link to some kind of gateway, that resumes the user's session?
Wouldn't the UI be able to listen to the bus for the "user created" event? And then you could correlate either by having the event include some kind of event ID linking back to the "user creation requested" event or against some other well known data in the event (like the user name). Though you probably also have to listen to multiple events, such as "user creation failure" event.
This is not unlike normal AJAX processing in a web browser. Technically, you don't block on the out of band call back to the web server. You invoke the call and you asynchronously wait for a callback.

receive as pick branch trigger does not fire

I have a WF4 Service with a flowchart as the root activity. It contains multiple correlated receive activites and decision branching to step through an approval process. The receive activities work perfectly until I try and use one as the trigger for a pick branch.
I am running tracking so can see that the receive is opened and in the persistance I can see the associated bookmark. When I send a client message with the receive type it does not trigger. I have a delay pick branch that fires OK but then the subsequent receive also does not work.
I have checked these receive activities individually and they work OK when not used as the pick trigger. I have tried the pick within a Sequence and a While but no difference.
I cannot see any difference between my implementation and may examples on the web. Am I missing something extra required when the receive is encapsulated by a pick branch?
There is nothing special about a PickBranch trigger that would cause a receive to behave differently so I suspect it is something with the Receive itself. What kind of errors are you seeing at the client application?