Push notifications

erikTsomik
erikTsomik used Ask the Experts™
on
I need to be able to push notification to users phone. I am trying to use ColdFusion to do that. However, I have issues. I found the site that supposed to explains how to do that with coldfusion .http://www.rickgroenewegen.nl/?p=77

However there is still some problems . If I doing thing on the fly I do not know what their phone type is (apple or android).
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try twilio
Inexpensive and very easy...

	<cfset this.smsFrom = "aaaaaaaaaaa" />  <!---- your account values go here ---->
	<cfset this.username = "xxxxxxxxxxxxxx">
	<cfset this.password = "yyyyyyyyyyyyyyyyy">

   <!---- returns the URL (defaults to current URL) by swapping the paramters abc=1, will replace abc=2 in the URL or if blank, it will remove it ---->
   <cffunction name="sendText" access="public" returntype="string" output="false">
       <cfargument name="toPhone"     type="string" required="false" default="">
       <cfargument name="textMessage" type="string" required="false" default="">

        <cfset var theResult = "">
        <cfset var theStatus = "">
		
		<h1>SMS Text Message via Twilio</h1>
		<cfhttp	method="post" url="https://api.twilio.com/2010-04-01/Accounts/#this.username#/Messages.json"
		        username="#this.username#"
		        password="#this.password#"
		        result="theResult">
		   <cfhttpparam type="formfield" name="From" value="#this.smsFrom#">
		   <cfhttpparam type="formfield" name="To"	 value="#arguments.toPhone#">
		   <cfhttpparam type="formfield" name="Body" value="#arguments.textMessage#">
		</cfhttp>

       <cfreturn theStatus>
   </cffunction>

Open in new window

erikTsomikSystem Architect, CF programmer

Author

Commented:
will it send like SMS or push notification?
sorry, this will simply send a text to the user's phone number
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

erikTsomikSystem Architect, CF programmer

Author

Commented:
Well I can do that for free by using cfmail tag and the phone number
Hmmm, sorry, I assumed that's what you mean by "notification"

Don't you need to have an app installed to be able to send other notifications?
erikTsomikSystem Architect, CF programmer

Author

Commented:
I have created the apple developer account to create a license and android account

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial