What is the proper way of updating subscriptions to the Glass timline when the IP of the target host changes? - google-mirror-api

Here's a situation that occurred to my team:
we inserted a Mirror API subscription with a CallbackUrl under a domain we control (the corresponding A record pointed to, say, IP1)
we verified we could receive Mirror API notifications from Glass devices
we changed the A record of our domain to point to a new host with a different IP address (let's call it IP2).
even after propagation of the updated A record, the Mirror API kept sending the notification to IP1 rather than IP2
Is the IP of the host associated with the callback URL cached by the Mirror API ?
Then, we tried the following:
we deleted the subscription and created a new one. The notifications kept going to IP1
we uninstalled and re-installed the Glassware, did a new Oauth authorization, etc.
We verified that on listing the active subscriptions,
they looked "fresh", with a recent "updated" timestamp.
However, notifications are go to the old IP address IP1.
Any ideas on what may be going on, and how to overcome this issue?
Thanks in advance!
Also submitted to issue tracker: https://code.google.com/p/google-glass-api/issues/detail?id=36&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary

Related

Any way to use URL Fetch Service in .NET Core?

Just ran into an issue where I have a service in Google App Engine Flex (GAEF) attempting to perform a GET operation on another service in GAEF (within the same Project) only to get a 403. After hours of guessing, I just added the caller's VM IP Address in the firewall rule to Allow and everything worked. I later read that URL Fetch service uses a set pool of static ip addresses which I could use reliably instead of having to constantly update the firewall rules whenever the caller has a new ip address.
Unfortunately, I don't see anywhere on how I can use this on .net core. Anybody run into this before?

How can i receive Salesforce Outbound Message from Mule?

I have use Outbound Message in salesforce. When the Trigger is Occur on the particular object outbound Message to pass particular End URL. here I want to receive the Outbound Message from the Mulesoft(EndPoint URL) . I have tried HTTP,UDP,TCP,Genric these Kind of endpoint URL but its not working. How i can Use the Mulesoft end point URL. by using Local host its possible or not. Because I have used Localhost:8081 this kind of URL only. what are all the way i have to receive salesforce outbound Message. Thanks
The target of the outbound message must be accessible from the web. It has to have some meaningful domain name or IP address (and if you're behind a firewall you need to allow messages from SF pool of IP addresses to pass through).
http://wiki.developerforce.com/page/Creating_an_Outbound_Messaging_Notification_Service_with_Eclipse_3.2#Testing_Your_Service
Testing can be a bit of a tricky wicket if you are not developing on a
machine that is accessible from the internet. Following the sample, we
have deployed our web service to localhost:8080. It is not possible
for the salesforce.com servers to make a request to that address.

Auto update feature in passbook ios 7

How does automatic updates work in passbook available in backfield of the pass, how to use webserviceURL key to get update from the server.
in webserviceURL key i have provided remote path from where updated pass can be downloaded, but even after content changed in server, it does not reflects in pass.
This question has been asked so many times, in so many ways, in so many forums; mostly by people that are too lazy to read the manual, or are too inexperienced / incompetent to understand it.
The first paragraph of the Passbook Web Service Reference explains why simply adding a link to an updated pass will not work.
A REST-style web service protocol is used to communicate with your server about changes to passes, and to fetch the latest version of a pass when it has changed. The endpoints always begin with the web service URL, as specified in the pass, followed by the protocol version number. For example, a request for the latest version of the pass of type com.apple.pass.example and serial number ABC123 might look like the following:
The Passbook web service is an integral part of the Passbook eco system. Anyone wishing to issue passes that change their content (either in response to a push message or in response to a user requesting fresh content by pulling down on the back of the pass), needs to implement their own Passbook web service.
This entails building a server capable of responding to the following to authenticated requests from each device that has installed your pass.
There are 5 methods that your web service should respond to:
1. Registering a Device to Receive Push Notifications for a Pass
POST request to https://webServiceURL/v1/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber
2. Getting the Serial Numbers for Passes Associated with a Device
GET request to https://webServiceURL/v1/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier?passesUpdatedSince=tag
3. Getting the Latest Version of a Pass
GET request to https://webServiceURL/v1/passes/passTypeIdentifier/serialNumber
4. Unregistering a Device
DELETE request to https://webServiceURL/v1/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber
5. Logging Errors
POST request to https://webServiceURL/v1/log
In order to have a pass respond to a manual refresh or push request you need to implement at least the first 3 methods. This is because the device will not issue any further requests until it has received a valid response to the registration request.
Furthermore, the web service must be available over https. An unsecured http service can be used for development, but production devices will only recognise a webServiceURL key that begins with https.

Passbook notification failing

Followed the intermediate Passbook tutorial from the book "iOS 6 by tutorials"
http://www.raywenderlich.com/store/ios-6-by-tutorials
I'm able to send a pass by email, add it to pass book, update it in my app and it updates when I open passbook but I'm not getting any notification. Notifications are turned on in the settings.
My guess is that it could be the firewall of my server. I'm new to the howl server setup. I'm running on a godaddy vps (centos).
When I run a list on iptables I get the following:
iptables -L -vn
Does this look right ?
Any clue appreciated !
Thanks
This is unlikely due to a firewall issue on the server side - but could possibly be an issue with the firewall of the router that your device is connected to. Apple delivers push notifications to devices on port 5223, so this needs to be open on your local router (assuming you are connected by wifi). If you can receive push notifications from other Apps (WhatsApp, Facebook, etc.) then you can rule out firewall as an issue.
You state that the pass does get updated - this implies that either a push is being received by Apple and is triggering the device to retrieve the new pass from your web service, or if you are using replacePassWithPass to update the pass via an App, this is functioning as expected.
In order for the pass to display a notification message:
A pass data field must have changed (changing pass types, colours, images or label values will not trigger a notification), and
The field must have the changeMessage key set (ideally the changeMessage contains %# which will be replaced by the new field value)
If the above two criteria are met and you are still not receiving a notification, then try hooking your device up to Xcode and watching the console log as you update a pass.

What is the alternative way of sending user location via sms on iOS6?

i have done a security app which locate a iPhone and send the GPS location of the phone through message to an associated number this functions works good until iOS 5, but the issue is sending SMS without users knowledge is restricted in iOS 6, so i need a help here instead of sending message, is there any other possible way or replacement for this function? any answer related to this method are appreciated.
Thank you.
You haven't specified whether your ios app has a server. If yes, you can transmit location to server and that in turn can transmit it to intended user via specific api.
If this is not correct, APNS is your friend. This is a way to send messages to desired devices only, the ones who explicitly registers through your app.
Another quite equivalent option is to store it in public back-end like parse.com. As soon as other devices start your app, they can pull your location from there. If their device is already live, parse.com can make sure to notify them as soon as you change your location value in their DB.

Resources