Can An iOS App Receive Google Drive Push Notifications Directly? - ios

The question pretty much says it. By "Directly" I mean without having to create anything (such as a web server) other than the app itself. As best as I can determine the answer is no. I'd be thrilled to learn otherwise.

Based from this documentation, you need to set up your receiving URL, or "Webhook" callback receiver.
This is an HTTPS server that handles the API notification messages that are triggered when a resource changes.
You also need to:
Register the domain of your receiving URL. For example, if you plan to use https://sampledomain.com/notifications as your receiving URL, you need to register https://sampledomain.com.
Set up a notification channel for each resource endpoint you want to watch. A channel specifies routing information for notification messages. As part of the channel setup, you identify the specific URL where you want to receive notifications. Whenever a channel's resource changes, the Drive API sends a notification message as a POST request to that URL.

Related

Sending push notifications from one device to another in iOS

I am creating an iOS application in which user orders an item, when the order ready, the vendor is supposed to inform the user via push notification.
My question is, is it possible to send push notification from one device to another?
For this purpose I want to use FCM. I read that they allow two sorts of messages.
Downstream, messages from server to device.
Upstream, messages from device to server.
Will upstream messages serve the purpose according to my requirement? If so, how am I supposed to implement them?
Let's say you were using Firebase, so for every registered users there is an ssociated device token id save into some collection right. (Registering flow)
Let's say you were using cloud functions (a vague definition would be function that are running into serverless architecture, and they get executed when there are called)
so you'd call this function from your app via HTTP with Post Method
logic:
- extract that http request
- who is sending the message (uid, message)
- who needs to receive that message (someone)
- query that someone's device token id and save it to recipient_device_token_id
- construct to push notification payload (message)
- send push notification for recipients using its recipient_device_token_id
- end the http response
Voila, I am sure there is other way of doing it, but this extracting all the logic from your app to the cloud.

iOS Twilio Receive Incoming SMS

I am developing an iOS messaging app that uses Twilio to send and receive SMS and MMS. The tutorial on Twilio about the iOS client seems to only cover outgoing and incoming calls. I understand that sending an SMS/MMS would mean that I send a HTTP request to my server, in which my server sends the request to Twilio in order to complete the sending. However, how would I receive messages on my app?
I know that Twilio numbers have web hooks that execute when the number receives this message, but how would I get this message to my app. I don't believe that there are delegate methods included like the voice ones. The only solution that I could think of right now would be to use push notifications from my server to the phone. Is there any other possible way? Thanks.
I was recently in a similar situation to yours, but my app only cares about receiving a response within a 2 minute window while the app is opened.
Regardless, I would say that your best options include 1) push notifications, 2) sockets (probably via Socket.io), or 3) background polling. If you plan to have your application receive the message agnostic of its state (open, closed, etc), then I would highly suggest using push notifications. I'm using Parse as my Twilio backend and it makes creating and working with push notifications a breeze :)

How to send and receive text messages without MFMessageComposeViewController?

I want to send and receive text messages without showing MFMessageViewController from my application. Could anybody tell me how is it possible?
Not Possible , Unless you use 3rd party api for send/received sms.
you have to use Web service and Apple Push Notification Service for send message to other user without using MFMessageComposeViewController
You can't do it without MFMessageComposeViewController. Apple won't allow to send SMS without user interaction.
I've alternate solution of this, out of scope of iOS. Use web service API. Create a web service at server side that send a message to specific number(s) that accept numbers as parameters with request.
At specific time interval (according to your requirement) send a web service call with number as request parameter.
Web server can do it. It can send message to any device.

Will Apple's APNS server let me send random Push Notifications to my Pass users?

If i have a pass generated and distributed over a bunch of PassBook users' devices, and i want to send a push notification outside of a pass update, would i be able to do so?
The documentation isn't clear. Has anyone had any experience with this. https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW59 I understand i'll have all the pushTokens from the devices usin fmy pass, so could i use them to send out notifications?
Once i build the web service that pushes the updated passes, can i use that service to send notifications without pass update? Just random communication with users?
You need to change the past content and have a changeMessage key set for the updated field(s) if you want anything to show on the lockscreen.
The following answer details all of the mandatory requirements to invoke a lock screen message from a push to a pass. How to make a push notification for a pass.
Specifically note point 5:
alert, badge, sound and custom property keys are all ignored - the
push's only purpose is to notify Passbook that your web service has a
fresh pass. The notification text will be determined by the
changeMessage key in pass.json and the differences between the old and
the new .pkpass bundles

Regional Monitoring and Push notifications in iOS

I need to update my users for things that happened around their current location while the app is in the background.
To my understanding:
If my server sends a Push Notification to a client, the client would immediately show that message.
I can set up the app so that there is a specific location, with a given radius could fire a message.
So what I want to understand if it is even possible to update my users about things that are new in their locations.
I was thinking of two possible solutions, I am not sure they are possible.
One, I guess if the Push Notifications would allow a function to run prior to its display,
deciding if the message should appear.
For example: something happened in area x,y - The server initiates a message to all devices. Only the devices within range of x,y and a radius z, would show the message to the users.
Maybe the Regional Monitoring service can send a message to my server and my server can then decide if to send a Push Notification back to the client...
For example
The user has entered a defined location, determined by the app. The app sends a message to the server. The server decides if a message is due.
Any ideas? is that even possible?
Filtering push notifications by topic is something you need to do on the server side, not the client side. Apple specifically states not to send messages to users that aren't relevant and you won't be able to block them when the app isn't running. Additionally, if you are using a service to manage your push notifications you don't want to pay for messages that aren't relevant.
So when you register a device into your database, you should register what topics that person is subscribing to (ie. save a list of topics that user is eligible to receive). Then when the event is triggered that generates the push notification only send to devices that are registered to that topic. I believe a number of push platforms have this capability already built in. On UrbanAirship and Azure Notification Hubs you can use their tags feature. Or you can develop it yourself if you do your own push server.
Take a look at Parse. They have this kind of functionality baked right in, just send the push to clients that match a geoPoint query.

Resources