Flight card not available in some countries? - google-schemas

I have an email markup that is triggering a boarding pass card ( with a barcode) on my phone in France, so I am sure the markup is OK.
However the very same markup received by a user in Colombia does not trigger any card.
We tried multiple phones and they get neither the itinerary nor the boarding pass.
Can it be that flight cards are not sent to some countries ( Colombia in that example ) ?
Thank you.

Answering to myself: indded not all countries are supported, list is here:
https://support.google.com/websearch/answer/6245953?hl=en
Colombia is not part of it at the moment.

Related

Twilio SMS Webhooks and Group Text Messages

Is it possible to maintain both group text messages and single text messages with users and keep them separate? I understand there is no concept of a group message per se, but wanted to see if any recent advances in tech has made this possible with Twilio or other providers.
In short, I am creating a POC where a user inside an iOS App can send invoke an API call to my backend application. This application receives a phone number from someone's contact list, and then connects to Twilio to send the SMS message to that target user.
When the user replies, I was researching Twilio Web hooks to receive the message, and then save it in the database. The originating user, then, would be able to see the message on a screen.
I would guess that when a user responds to the twilio message, the only metadata that comes in is their message and phone number, so the "foreign key" is the phone number.. Thus when I save it in my database, I have their phone number and message.
This works up until someone decides to target two or more people in an SMS message using my API, and then target one of those people individually. For example they select me as a sole recipient, and then select me and someone else as a group text message.
In this case, how could my system/Twilio differentiate between if I was responding to the group message, or to the single message?
Any ideas or work arounds? Maybe another technology? Thanks!
I wanted to provide an answer to this in case anyone else was looking into this.
Essentially you pay 3 cents (0.03) per month per active user in each group. Basically you buy phone numbers for each group chat you need.
https://www.twilio.com/conversations/pricing
So if you're doing a million group chats obviously it can get costly, but for simple POCs this isn't the end of the world.
Enjoy!

How to get a country code from the given phone number

I have two phone numbers +17896786788 and +322657579849. I would like to retrieve only the code I.e, +1 and +322 by passing these phone number.
Is there any API avalable to get the code out of phone number?
libphonenumber gives the country code for the given country. Link: libphonenumber ios get country code for country
But I would like to get the code out of phone number.
I spent a long time investigating this, and so far there is no way to do this on iOS.
Sure we can make a guess, and it would work in most cases, but there is always some cases where it will be difficult, let me give you a few exemples:
Canada and USA share the same international prefix: +1
Martinique is part of France, but has its own international prefix: +596
Taiwan can be considered part of China or not depending on the user's interpretation
And the list goes on..

Twilio inbound messages - Not Shown

I'm having a problem receiving Messages and i don't know where and what goes wrong.
Right now i received messages from the United States that are shown in the Inbound Twilio Dashboard and are accessible through the API.
e.g.:
<% #client.account.sms.messages.list({ from: "#{#contact.mobile}", }).each do |message| %>
Bur responses from other countries don't show up anywhere.
For Sending and receiving messages i use the format:
+1757*******
Has the format something to do with it ? What am i missing?
From Twilio Doc:
Phone numbers should be formatted with a '+' and country code e.g.,
+16175551212 (E.164 format). For 'to' numbers without a '+', Twilio will use the same country code as the 'from' number. Twilio will also
attempt to handle locally formatted numbers for that country code
(e.g. (415) 555-1212 for US, 07400123456 for GB). If you are sending
to a different country than the 'from' number, you must include a '+'
and the country code to ensure proper delivery.
After some serious Twilio Scanning i found the Answer - Read below
Twilio Evangelist here.
This could be a number of things. So first off, do the incoming messages show in your Message Logs on the Twilio Dashboard?
If they don't show up, then you make sure you have a URL set for number receiving them.
If they do show up, copy one of the numbers as shown in the logs and try this out in your app. It's a little tricky to be specific without more details, but I expect you should use the +<country><number> format as stated. So for US: +1415xxxx..., for the UK +447590xxxx...' and so on.
You could also try running this code:
<% #client.account.messages.list({to: your_twilio_number}).each do |message| %>
Display all the messages and check for the inbound messages there, then try again once you've double checked your contact.mobile formatting.
Hope this helps.
For everyone with the Same Issue.
When Setting up a Twilio account you receive a US Number, which works a little different from other Countries.
SMS Enabled Phone Numbers: Some are able to send SMS internationally and domestically, but others are only able to send and receive SMS domestically.
For the United States there is no Mobile, only Toll-Free and Local. With that, other carriers (Outside the US) wont even let your sms trough, thinking that the number on the other end is not a Mobile.
Basically, only US Numbers can send an SMS to a US Number, other countries can't.
So i bought a UK Number and everything is working now.

Getting contacts who own an iDevice

Is there a way through addressbookUi framework to get only the contacts who own an iDevice? The check for example is done in the messages app for iMessage. But is this available for developers? Or is there another way to check for this? Thank you in advance..
You could check, for each address book record, if there is a phone number of type "iPhone" (represented by the constant kABPersonPhoneIPhoneLabel). There's really no way of knowing for sure which of the contacts "owns an iDevice" anyway, but if there is an iPhone number for them in the address book record, then there's a good chance of them using an iPhone. Of course, it's another story altogether how that information got in your address book, and whether it is reliable.
No there isn't... The SMS app would be checking with apples servers to see if the phone number is registered with iMessage or not.
This is not a publicly accessible API.
I guess you could hash then send the users number to your own remote database and then compare contact numbers in another users address book against your database to see if they are users of your app... It's not really what you asked to do but it's the closest solution I could think up

How do apps like Path and Instagram tell if contacts are also using the app?

I am interested in building an app that has a Find Friends by contacts function similar to Path's or Instagram's but am not sure how it's done.
I know Path and Instagram upload your address book to their server, but how are they able to tell if a particular contact is also using the app? Does it also upload the user's phone number and thus match by phone numbers?
CLARIFICATION: I do not save email addresses (or any info other than the contact's phone number) in my address book, yet somehow Path and Instagram are able to tell if that phone number belongs to a user on Path / Instagram. How is this?
There are two join points between your address book and theirs:
Your e-mail address (and phone number).
Your friends address books that contain your e-mail address (and phone number).
Basically, just because you don't have their e-mail address listed doesn't mean they don't have yours listed. They could also filter this "who has your e-mail in their address book" based on the names and/or phone numbers in your address book.
Yes, it could also be joining on phone number. The point here is that there are many ways to join data together, and your phone doesn't have the complete picture of what they have.

Resources