How to Send Whatsapp Media Using Json for Twilio Api? - wordpress

I want to send Pdf file with message text in wordpress Using Twilio API in json format. How can i achieve it ?
To Send message on whatsapp i used below code.
https://www.wpcodetips.com/wordpress-tutorials/how-to-send-an-sms-from-wordpress-programmatically/
I want to send pdf file also with message via json . How can i achieve it with Twilio API in wordpress ?

Related

Push Notification for UWP using Amazon SNS

We are developing a Xamarin UWP app that is supposed to receive Push Notifications using WNS. We are using Amazon SNS to send notifications. We made sure that the app is registering itself with proper channel URI to our backend, package name of the app is same as in the store and using Cognito credential put device token entry in Amazon application arn. I have sent raw message to device endpoint and message received in device properly. We couldn't send as Json format and tried as mentioned in below link.
https://anbu2016.wordpress.com/2016/03/17/push-notification-with-wns-and-aws-sns/
But didn't know where to receive notification from application.
For example, ReceivedRemoteNotification as override method present in iOS and it will help process the notification. In my process sent argument then based an argument, we can navigate to different page. How can we do this in UWP using JSON format.
Please help me on this.
Regards,
Cheran

How to send push notification with custom images to web application using FCM in java

I have created 2 simple applications; OAuth 2 spring boot based server app and a web based client app. After completing an activity, the server app is supposed to send a push notification to client app using FCM with some custom image.(images may vary depending on activity, like in Facebook ).
So can anyone tell me what is the best way to send custom images from server app to client app(web-based) using FCM? Give me just some basic hints
Although this can be done by first sending just urls of the custom images in notification, and then these urls will be used by client app to download images, but how to handle this if server is oauth protected(like in my case)? How it can be handled using server workers before showing a notification to user?
Is it good to first send an image from server side as Base-64 encoded string, and then decode this string back into an image on client-side?
So can anyone tell me what is the best way to send custom images from server app to client app(web-based) using FCM? Give me just some basic hints
For me, this notification worked (in PHP):
$notification = [
'title' => 'Hello world',
'body' => 'How are you?',
'click_action' => 'https://www.example.com/app/#home',
'icon' => 'https://www.example.com/icon.png'
];
This successfully delivers a Firebase Cloud Messaging push notification to a web application. If their browser is in the background, the icon will be displayed alongside the title and body, and then clicking on the notification will take them to the URL specified in the click_action property.
Knowing to use icon was the trickiest part for me, I was trying things like image and picture, but finally found some docs about it here.
how to handle this if server is oauth protected(like in my case)? Is it good to first send an image from server side as Base-64 encoded string, and then decode this string back into an image on client-side?
I do not know the answer to these. Perhaps these questions should be asked in their own SA questions/threads. Good luck, and happy coding.

Hot to implemet notification direct reply in Ionic2

Is it possible to implement direct reply using Ionic2? I'm looking for a way to capture a users response directly from the notification (style WhatsApp) without them having to open the app.
I'm using the phonegap-plugin-push plugin to handle notifications.
I would love to see a plugin like that too, i am currently using the Ionic deeplink plugin and open the message dialog directly in the app. https://ionicframework.com/docs/v2/native/ionic-deeplinks/

Amazon SNS publishing topic

I am working on Amazon SNS service, which sends notifications to the endpoint (email,http,https,etc..). I can see the message sending format options either in Raw or Json, by any means do we have any option available that we can publish the message in "XML" format.
Currently only JSON and Raw messages are supported, however, if you need to push an XML message - you can send it as a "Raw" one - it'll work for all channels. But, if you want to customize your message on receiving device, e.g. add custom icon or play a custom sound on message receive - there is no alternative to JSON format in Amazon SNS right now.

How to work with push notification module in drupal7? and how to store device token?

I am using push notifications module. One of my friend did an app for iphone. He gave me apns-development.pem file and i stored it in my drupal/pushnotification/certificates folder. now i have to give him the url or web service so that , using the web-service he can give device_token as parameter and that devicetoken should be stored in my database for sending push message for that particular device. Pls help me
I'm the author of the Push Notifications module for Drupal. I wrote a brief tutorial about registering a device token using services here: http://www.danielhanold.com/story/drupal-7-push-notifications-how-to-register-a-device-token-using-services.

Resources