0% found this document useful (0 votes)
23 views

Push Notifications and DataSnap - Community Blogs - Embarcadero Community

The document discusses using DataSnap to send push notifications through a server method when restricted to only port 80. The author created a SendPushNotification method that takes a device token and message as parameters. This method can then be called from any browser using a URL scheme to send push notifications even when limited to just port 80.

Uploaded by

bkk.prog2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Push Notifications and DataSnap - Community Blogs - Embarcadero Community

The document discusses using DataSnap to send push notifications through a server method when restricted to only port 80. The author created a SendPushNotification method that takes a device token and message as parameters. This method can then be called from any browser using a URL scheme to send push notifications even when limited to just port 80.

Uploaded by

bkk.prog2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

Push Notifications and DataSnap


P O S T E D B Y A N D R E A S O 1 3 8 7 ( / V I E W - P R O F I L E / 1 3 8 7 - A N D R E A S ) O N T U E S D AY , 2 5 J U N E 2 0 1 3 I N B L O G S
( / B L O G S / C AT E G O R I E S / L I S T I N G S / B L O G S )

I was recently in a situation where I had access to only port 80.

This means that RDP (port 3389) doesn't work... Amazon EC2 APNS demo was out.

Even local APNS was out, because it uses port 2195 from the sending server...

So, I decided to retrofit my APNS server and make it a DataSnap server responding to port 80 in addition to being a client I can click a
button on using RDN to Amazon EC2.

I created a server method SendPushNotification. It takes the DeviceToken and the text message as parameters.

I call it from any browser anywhere on the following URL scheme:

http://MyEC2Instance/datasnap/rest/TServerMethods1/SendPushNotification/DeviceToken/Message

And it works! So next time I'm locked down to port 80 my demos will work just fine...

(/files/2013/06/photo_9090.PNG)

Sometimes I'm easily amused! :)

Delphi (/blogs/tags/tag/delphi) Delphi XE4 (/blogs/tags/tag/delphi-xe4) FireMonkey (/blogs/tags/tag/firemonkey) iOS


TA G S : (/blogs/tags/tag/ios)
iPhone (/blogs/tags/tag/iphone) RAD Studio (/blogs/tags/tag/rad-studio) RAD Studio XE4 (/blogs/tags/tag/rad-studio-xe4)

RELATED POSTS

(/blogs/entry/learning-github-basics)

Learning GitHub Basics (/blogs/entry/learning-github-basics)

(/blogs/entry/learn-how-to-execute-external-commands-on-linux-from-an-auto-tables-for-rad-

server-endpoint)

Learn How To Execute External Commands On Linux From An Auto Tables For RAD Serv... (/blogs/entry/learn-how-to-

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 1/6
7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

execute-external-commands-on-linux-from-an-auto-tables-for-rad-server-endpoint)

(/blogs/entry/ux-prototyping-webinar-replay)

From Vision to UX Design with RAD Studio - Webinar Replay (/blogs/entry/ux-prototyping-webinar-replay)

(/blogs/entry/demo-listbox-combined-as-master-detail-relationship)

Demo Listbox combined as master-detail relationship (/blogs/entry/demo-listbox-combined-as-master-detail-


relationship)

Comments

Delphi Labs: DataSnap XE – Simple Calculator Service | account loans (http://acctloans.com/delphi-labs-datasnap-xe-simple-


calculator-service/) Saturday, 28 September 2013

[...] Głowacki and today I’m going to use Delphi for building a simple calculator service using DataSnap technology. The d… Video
Rating: 5 / [...]

Please login first (/login?return=L2Jsb2dzL2VudHJ5L3B1c2gtbm90aWZpY2F0aW9ucy1hbmQtZGF0YXNuYXAtMzk0OTU=) in order


for you to submit comments

Page : 1

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 2/6
7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

SHARE IT

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 3/6
7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

(/blogs/entry/get-the-competitive-edge-with-fireui) Get the Competitive Edge with FireUI


(/blogs/entry/get-the-competitive-edge-with-
fireui)
P O S T E D BY S A R I N A D ( / V I E W - P RO F I L E / S A R I N A - D ) O N 2 1
SEPTEMBER 2018

(/blogs/entry/deep-delphi-discussions) Deep Delphi Discussions (/blogs/entry/deep-


delphi-discussions)
P O S T E D BY J I M M C K E E T H ( / V I E W - P RO F I L E / J I M - M C K E E T H ) O N
21 SEPTEMBER 2018

(/blogs/entry/targeting-ios-12-with-rad-studio) Targeting iOS 12 with RAD


Studio
(/blogs/entry/targeting-
ios-12-with-rad-studio)
P O S T E D BY S A R I N A D ( / V I E W -
PROFILE/SARINA-D) ON 19
SEPTEMBER 2018

(/blogs/entry/learn-to-program-with-community-edition) Learn to Program with


Community Edition
(/blogs/entry/learn-to-
program-with-
community-edition)
P O S T E D BY R E B E K A H D ( / V I E W -
P R O F I L E / 4 6 1 9 4 - ) O N 1 8 J U LY
2018

(/blogs/entry/introducing-delphi-cplusplusbuilder-community-edition) Introducing
Delphi and
C++Builder
Community
Edition
(/blogs/entry/i
delphi-
cplusplusbuilde
community-
edition)
P O S T E D BY
SARINA D (/VIEW-
PROFILE/SARINA-
D ) O N 1 8 J U LY
2018

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 4/6
7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

(/blogs/entry/compilers-that-ship-with-c-builder-10-3-rio) C++ Compilers that ship with


C++Builder 10.3 Rio
(/blogs/entry/compilers-that-ship-with-
c-builder-10-3-rio)
P O S T E D B Y D AV I D I ( / V I E W - P R O F I L E / D AV I D I ) O N 2 1 N O V E M B E R 2 0 1 8

(/blogs/entry/c-language-update-iso-c-meeting-bjarne-videos-etc) C++
language
update -
ISO C++
meeting,
Bjarne
videos,
and more
(/blogs/ent
language-
update-
iso-c-
meeting-
bjarne-
videos-etc)
P O S T E D BY
D AV I D I
(/VIEW-
P R O F I L E / D AV I D
ON 15
NOVEMBER
2018

(/blogs/entry/learning-github-basics) Learning GitHub Basics


(/blogs/entry/learning-github-basics)
P O S T E D BY B O G DA N P O L A K B S C ( / V I E W -
PROFILE/27065-) ON 9 NOVEMBER 2018

(/blogs/entry/android-z-order-native-controls-and-10-3-rio) Android Z-Order, Native Controls, and 10.3


Rio (/blogs/entry/android-z-order-native-
controls-and-10-3-rio)
P O S T E D BY J I M M C K E E T H ( / V I E W - P RO F I L E / J I M -
MCKEETH) ON 3 NOVEMBER 2018

(/blogs/entry/new-in-10-3-ide-ui-improvements-in-the-main-window) New in 10.3: IDE UI Improvements


in the Main Window
(/blogs/entry/new-in-10-3-ide-ui-
improvements-in-the-main-
window)
P O S T E D B Y D AV I D M I L L I N G TO N ( / V I E W - P R O F I L E / 1 2 1 6 9 - ) O N 3 1 O C TO B E R 2 0 1 8

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 5/6
7/12/22, 10:01 AM Push Notifications and DataSnap - Community Blogs - Embarcadero Community

DataSnap (/blogs/tags/tag/datasnap) ednfront (/blogs/tags/tag/ednfront) CodeRage (/blogs/tags/tag/coderage) iOS (/blogs/tags/tag/ios) General Software Development

(/blogs/tags/tag/general-software-development) CodeGear (/blogs/tags/tag/codegear) Delphi (/blogs/tags/tag/delphi)


InterBase (/blogs/tags/tag/interbase) Japan (/blogs/tags/tag/japan) C++Builder (/blogs/tags/tag/cbuilder) VCL (/blogs/tags/tag/vcl) 日本
(/blogs/tags/tag/2016-06-22-01-53-36) News (/blogs/tags/tag/news) iPhone (/blogs/tags/tag/iphone) Android (/blogs/tags/tag/android) Embarcadero
(/blogs/tags/tag/embarcadero) MAC OSX (/blogs/tags/tag/mac-osx-1) Events (/blogs/tags/tag/events) C++ (/blogs/tags/tag/c-1) Programming
(/blogs/tags/tag/programming) RAD Studio (/blogs/tags/tag/rad-studio) FireMonkey (/blogs/tags/tag/firemonkey) Delphi XE2
(/blogs/tags/tag/delphi-xe2) .NET (/blogs/tags/tag/net-1) 64-bit (/blogs/tags/tag/64-bit) Windows (/blogs/tags/tag/windows) PHP (/blogs/tags/tag/php) Mobile
(/blogs/tags/tag/mobile) Delphi Programming (/blogs/tags/tag/delphi-programming) Object Pascal (/blogs/tags/tag/object-pascal)

Dustin KSB (/view-profile/14577-) 26th November 2018

I've just installed c++ builder 10.3 comm ed. But how can i install boost library with Rio? As you k...

C++ Compilers that ship with C++Bui... (/blogs/entry/compilers-that-ship-with-c-builder-10-3-rio#comment-19995)

Andrea Maria (/view-profile/69726-) 26th November 2018

Thank you all for your information. https://fugenx.ae/

From Vision to UX Design with RAD S... (/blogs/entry/ux-prototyping-webinar-replay#comment-19994)

nacymack (/view-profile/69714-) 26th November 2018

Interesting post I really enjoyed for this post and never before for this type of post it is useful ...

Unexpected Benefit of Inline Variab... (/blogs/entry/unexpected-benefit-of-inline-variables-conditional-blocks#comment-19993)

cruzjohn (/view-profile/69710-) 25th November 2018

I'm going to focus on the collaboration between RAD Studio IDE and our new storehouse Write my Paper...

Android Z-Order, Native Controls, a... (/blogs/entry/android-z-order-native-controls-and-10-3-rio#comment-19992)

home (//www.embarcadero.com) company (//www.embarcadero.com/company/about-us) communities (//community.embarcadero.com)


partners (//www.embarcadero.com/services/partners) copyright (//www.embarcadero.com/copyright) privacy
mackshaun (/view-profile/69709-) 25th November 2018 report software piracy (https://reporting.bsa.org)
(//www.embarcadero.com/privacy-statement)
A debt of gratitude is in order for the incredible site with us. Its so imperative diversion for us ...
 (http://www.facebook.com/#/pages/Embarcadero-Technologies-Database-Application-
C++ language update - ISO C++ meeti... (/blogs/entry/c-language-update-iso-c-meeting-bjarne-videos-etc#comment-19991)
Software-Tools/34960937498)
 (http://www.linkedin.com/groups/Embarcadero-Technologies-2551723?
homeNewMember=&gid=2551723&trk=&ut=0FDQJXEVmowRM1)
 (https://plus.google.com/+embarcadero/posts)
 (https://www.youtube.com/user/EmbarcaderoTechNet)
 (https://twitter.com/EmbarcaderoTech)  (/?format=feed&type=rss)
© 2022 Embarcadero Technologies, Inc. (http://www.embarcadero.com) All rights reserved.

https://community.embarcadero.com/blogs/entry/push-notifications-and-datasnap-39495 6/6

You might also like