Sending recieved messages from Twilio to Firebase realtime database - firebase-realtime-database

I just want to ask if it is possible to have Twilio receive messages from the user and upload their message to Firebase realtime database? I found a project that uses Twilio and Firebase cloud function but is there any Twilio and firebase realtime database integration?

Yes it is possible with Zapier. However it isn't cost-effective for my project so that has to go and I am just currently going for making a cheap SMS gateway using a USB SMS modem.

Related

Is it possible to get Apple Push Notifications with Firestore?

Is it possible to implement APNS with Firebase Firestore?
I've managed to send a push notification to devices via Firebase Cloud Messaging from the web console but my app needs to have push notifications for changes in the database, such as when the user receive a like or a friend request.
Is there any workaround?
Thanks for pointing me in the right direction.
You need to use Firebase Cloud Functions with the FireStore triggers. The first link has your use case.
There are some great tutorial videos on Firebase's YouTube account. It even includes adding a Firestore Trigger.
You can also send device-to-device push notifications, which work great for 1-1 relationships (1-1 chat, for instance). To achieve that, you can leverage this endpoint https://fcm.googleapis.com/fcm/send.

Alexa sending SMS text Messages

I am looking for any sort of iPhone function for sending messages that can be accessed by an Alexa skill that is able to send SMS text messages, as well as read SMS text messages of a user. I know that these skills are already present, however, I am looking to do this in combination with numerous other features which I have already finished.
Any help would be much appreciated. Thanks!
Alex Skills normally run as Amazon Lambda functions. Lambda functions can call other AWS services (from the cloud, not from the phone).
Amazon SNS can send an SMS message. Here is an example using the AWS Command-Line Interface (CLI):
aws sns publish --phone-number +XXXX --message "Hello!"
However, if you are looking to send messages from the phone itself, or read messages that are already on the phone, then you will need to write an iPhone app than can use the iOS APIs to send/receive messages. This would not, however, be an 'Alex Skill' since it is running on the phone.

Connecting Twilio SMS to my phone via XMPP

I'd like to interact with my customers via texting/messaging on a phone app, but not use my personal phone number. Although this seems like a common need, haven't found a solution for that yet.
Twilio SMS services are amazing. I'd like to take advantage of those services as well as utilize a familiar iMessage like interface for interaction with in and out SMS/MMS messages.
Was wondering if I could avoid re-inventing the wheel by using a standard XMPP iOS app with a standard XMPP chat server and only build an intermediate service that would translate between Twilio SMS and XMPP.
I've got to assume that other's have already solved this problem. I'd would love to hear your input on using this approach or hearing how you've solved this.
Twilio developer evangelist here.
I am not an expert in XMPP I'm afraid. However, a bit of Googling turned up the following links:
SMS over XMPP with Twilio
Multi channel chat with Twilio and Google App Engine
Cloudpipes Twilio XMPP integration
Perhaps one of those might help?
This XMPP component connects Twilio SMS and voice to XMPP: https://wiki.soprani.ca/TwilioSetup
I posted an Android SMS app called Owl SMS, that allows you to do what you wanted, keep your personal SMS (from your mobile phone number) separate from your business SMS. At this time, it only does text, I haven't added MMS.
https://play.google.com/store/apps/details?id=com.tigerfarmpress.owlsms&hl=en

Firebase notification records/log API

I'm sending messages to several iOS Apps via
FCM by using their HTTP protocol API,
and I need a list of message records including the payload, sent time, and platform like what I could monitor in the Firebase Notification Console.
It seems that messages sent via HTTP API wouldn't be recorded and shown in the console (only those sent manually in the console would).
I haven't found any API documents related to those messaging events/log fetching.
Is there a way to fetch this kind of message information from FCM?
As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html
Update: The FCM Diagnostics page has been disabled since last year.
If you have a Play Dev Console account and if your app is in at least Alpha Testing, you can make use of the Diagnostics and Statistics page. However, if you're looking for an API, there is currently no API available for it.
Otherwise, I think most of the details you need (like the payload and time sent) can be logged from your app server alone.
And just to support what you already mentioned in your post, as stated by #FrankvanPuffelen here:
The Firebase Notifications charts only show analytics for messages that were sent using the Firebase Notifications panel.
There is currently no public API to send Notifications to audiences. The web interface in the console is the only way to send them.
There is currently no API to feed your own FCM messages into the Firebase Notifications analytics panels.
If you want to fetch data on push notification client side you could use the BigQuery exports of Analytics data.
Here is a list of events, as you can see there are several events on notifications, including notification_open and notification_send.
Unfortunately notification_send seems to be available only for Android apps. I don't know why since the Firebase GUI console Message Delivery Report does contain iOS sends as well.

Transfer file when receiver is offline in XMPP

How to transfer file when receiver is offline in XMPPP Protocol? Which extension have to use? Any sample code available for iOS?
You need to store file somewhere and send link as described in Out Of Band Data extension. Message will be delivered when recipient will be online.
You can check that your receiver is offline. So If receiver is offline than you have to upload your message to your server using web service. And your receiver have to get all offline messages using web service after xmpp stream connect.
This is best way for offline message. Please do like this and let me know if any problem.

Resources