From 8012a794a90f6c191e96340a5de5fe05e8d77dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Parreira?= Date: Tue, 7 Jul 2015 18:38:39 +0100 Subject: [PATCH] Version 1.0.0 --- www/README.md | 42 +++++++++++++++++ www/config.xml | 29 ++++++++++++ www/css/index.css | 115 ++++++++++++++++++++++++++++++++++++++++++++++ www/img/logo.png | Bin 0 -> 21814 bytes www/index.html | 114 +++++++++++++++++++++++++++++++++++++++++++++ www/js/index.js | 51 ++++++++++++++++++++ 6 files changed, 351 insertions(+) create mode 100644 www/README.md create mode 100644 www/config.xml create mode 100644 www/css/index.css create mode 100644 www/img/logo.png create mode 100644 www/index.html create mode 100644 www/js/index.js diff --git a/www/README.md b/www/README.md new file mode 100644 index 0000000..9a19716 --- /dev/null +++ b/www/README.md @@ -0,0 +1,42 @@ +# Adobe PhoneGap Build iOS/Android Push Notifications with Realtime +This project shows how to build an Android app able to receive APNS and GCM push notifications built using the [Adobe PhoneGap Build](https://build.phonegap.com/) and the Realtime [CordovaPush](https://build.phonegap.com/plugins/3684) plugin. + +## Push notifications setup guide + +- Create a Google project, more info [here](http://messaging-public.realtime.co/documentation/starting-guide/mobilePushGCM.html). + +- Enter your Realtime Application Key and Google Project Number at the `OrtcPushPlugin.connect` call: + +- Set the `push-notification` event listener: + + document.addEventListener("push-notification", function(notification) { + var payload = document.getElementById('payload'); + payload.innerHTML = JSON.stringify( notification.payload ); + payload.value = JSON.stringify( notification.payload ); + }, false); + +- Add the `CordovaPush` plugin to your `config.xml` file: + + + + +## Testing the app +Start the app, enter a channel name and subscribe to it. + +Now open the Realtime Web Console at [http://console.realtime.co](http://console.realtime.co), enter your Realtime Application Key, connect and send a message to the channel you have subscribed in the app. + +If the app is in background or closed you should see a new message added to your notification manager. Tapping it will open the app and show the push payload in the UI. + +If the app is in foreground you should see the push payload immediately in the UI. + +## Documentation +The CordovaPush Plugin Documentation can be found [here](https://github.com/realtime-framework/CordovaPush). + +The complete Realtime® Messaging reference documentation is available [here](http://framework.realtime.co/messaging/#documentation) + +## Security note + +For simplicity these samples assume you're using a Realtime® Framework developers' application key with the authentication service disabled (every connection will have permission to publish and subscribe to any channel). For security guidelines please refer to the [Security Guide](http://messaging-public.realtime.co/documentation/starting-guide/security.html). + +**Don't forget to replace `YOUR_APPLICATION_KEY` with your own application key. If you don't already own a free Realtime Messaging application key, [get one now](https://accounts.realtime.co/signup/).** + \ No newline at end of file diff --git a/www/config.xml b/www/config.xml new file mode 100644 index 0000000..7cc39fc --- /dev/null +++ b/www/config.xml @@ -0,0 +1,29 @@ + + + Adobe PhoneGap Build Push Notifications + + This project shows how to build an iOS/Android app able to receive APNA/GCM push notifications built using Adobe PhoneGap Build + + + Realtime + + + + + + + + + + + + + + + + + + + + + diff --git a/www/css/index.css b/www/css/index.css new file mode 100644 index 0000000..51daa79 --- /dev/null +++ b/www/css/index.css @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ +} + +body { + -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ + -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ + -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ + background-color:#E4E4E4; + background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-gradient( + linear, + left top, + left bottom, + color-stop(0, #A7A7A7), + color-stop(0.51, #E4E4E4) + ); + background-attachment:fixed; + font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; + font-size:12px; + height:100%; + margin:0px; + padding:0px; + text-transform:uppercase; + width:100%; +} + +/* Portrait layout (default) */ +.app { + background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ + position:absolute; /* position in the center of the screen */ + left:50%; + top:50%; + height:50px; /* text area height */ + width:225px; /* text area width */ + text-align:center; + padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */ + margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */ + /* offset horizontal: half of text area width */ +} + +/* Landscape layout (with min-width) */ +@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { + .app { + background-position:left center; + padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */ + margin:-90px 0px 0px -198px; /* offset vertical: half of image height */ + /* offset horizontal: half of image width and text area width */ + } +} + +h1 { + font-size:24px; + font-weight:normal; + margin:0px; + overflow:visible; + padding:0px; + text-align:center; +} + +.event { + border-radius:4px; + -webkit-border-radius:4px; + color:#FFFFFF; + font-size:12px; + margin:0px 30px; + padding:2px 0px; +} + +.event.listening { + background-color:#333333; + display:block; +} + +.event.received { + background-color:#4B946A; + display:none; +} + +@keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +@-webkit-keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +.blink { + animation:fade 3000ms infinite; + -webkit-animation:fade 3000ms infinite; +} diff --git a/www/img/logo.png b/www/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9519e7dd78adb6e44548c08510a7bf02442a7697 GIT binary patch literal 21814 zcmV*iKuy1iP)KLZ*U+IBfRsybQWXdwQbLP>6pAq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$vYLW%^68ZR8T*Zl7up)s`DH*-ANJ}Xk`W+Ro6Cs zHE&gf1TrLImI)v;Kr1so=YsQ<;o(>gs9E7*RPl}0MtD5Anjiik@rQ^8_x=;nVHv9NKqZE zSx%C!^3%=|9SCFz< zv{I2X!x{FdN|DJ~Ak~2>3V>NBknw7EsH#ZTI@DDbBOogPm`eaWGu59~eR)xwbOMMf z0EjA>@kWXnpbRN0N>n`|KQu=rDxF>sF@Nd!6O0%u55#$-KK7E_Q%>LUeUejR{w8auU0P(YP9TY0L!s`^(c zVa65dwuD42Q~#U+PEl~f;pXM+m**_yaimqcYS0;^nobj-RFQZ`Maf#m4&+6yvH}6B zg4EA7WAbcN9fXwPa)oCtRL1xs-gn*R3+;4T5*_WAxWu3opO$og%UQPN*Fc| z+*v{_k2=d#|3zMZT7qVo1p1GqO@L5+iwvM6LprC`ds*y0&nA7ns{AS@0HHW0pJxWt zk+Nk#tz(;V+Uu`MO{o-bnO6Vl*)rQ!@=){&xBy?S~bgR?3lkQZ{zBJPW5rlLA6 zRG1v49I;u0J5AeuoC2%L;6XV<8cSq1v#6u$QSh2kFIV=p22{>?9#w5tlz_EJ(y9`0 zmq}BUdHrcXQi0t=DT%1xSec5ZjNhRQb09BvkDT+QKd&N9=`|=ht4LKsd9^^6W-O{4 zC}Isz;Aoen1ag)$Rn&)XLv(&6808o|_1Qh3smf4l|tNtB!Q#*CDXE=7g?7VR4R$!4>u|bJWV{vSS0aj)a{C&?hN9U#~!&wX>CH z-&Tz@@s!ui(-gna6riID$IrsqIX4Mr2jZdzZB-@W)Dkqk?{O13rimEM(vv^mP8Z-@ z^Ef`{q=}9(W(1U3W;4yCv&Q*0H8A;@pgxZD%sp<_J(=l9p%rJEutl zol{P)O&ga_ + + + + + + + + + + Hello World + + + +

PhoneGap Build Push Notifications

+
+

Channel:

+
Not subscribed
+
+ +
+ +
+

Push Payload:

+ +
+ +
+

Send Message:

+ +
+ +
+ + + + + + diff --git a/www/js/index.js b/www/js/index.js new file mode 100644 index 0000000..c31cd83 --- /dev/null +++ b/www/js/index.js @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +var app = { + // Application Constructor + initialize: function() { + this.bindEvents(); + }, + // Bind Event Listeners + // + // Bind any events that are required on startup. Common events are: + // 'load', 'deviceready', 'offline', and 'online'. + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + // deviceready Event Handler + // + // The scope of 'this' is the event. In order to call the 'receivedEvent' + // function, we must explicitly call 'app.receivedEvent(...);' + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + // Update DOM on a Received Event + receivedEvent: function(id) { + var parentElement = document.getElementById(id); + var listeningElement = parentElement.querySelector('.listening'); + var receivedElement = parentElement.querySelector('.received'); + + listeningElement.setAttribute('style', 'display:none;'); + receivedElement.setAttribute('style', 'display:block;'); + + console.log('Received Event: ' + id); + } +}; + +app.initialize(); \ No newline at end of file