Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telerik pushplugins bug fixes for phonegap build plugin pushnotifications #511

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
cf8a204
#1 Support multiple push notifications on Android
EddyVerbruggen Nov 2, 2014
e08226a
#1 Support multiple push notifications on Android
EddyVerbruggen Nov 2, 2014
69a4b0d
#2 Add 'isRegistered' function
EddyVerbruggen Nov 2, 2014
5882dd9
#2 Add 'isRegistered' function
EddyVerbruggen Nov 2, 2014
8b5d312
#2 Add 'isRegistered' function (renamed to 'areNotificationsEnabled')
EddyVerbruggen Nov 18, 2014
3f03d35
#1 Support multiple push notifications on Android (but don't make it …
EddyVerbruggen Nov 18, 2014
d0680f8
bump
EddyVerbruggen Nov 18, 2014
d8ee22d
Update documentation with the new features
yyosifov Nov 20, 2014
191f401
Initial repo documentation
yyosifov Nov 20, 2014
3dabb2b
#3 Several registration bugs
EddyVerbruggen Nov 20, 2014
a21fd31
#4 iOS interactive push
EddyVerbruggen Nov 23, 2014
3b52601
Fixed space
EddyVerbruggen Nov 24, 2014
c7867d0
Fixed space
EddyVerbruggen Nov 24, 2014
5a7e696
Added concrete push plugin Interactive Push example
yyosifov Nov 25, 2014
2e2312f
Fix spacing in the code snippet
yyosifov Nov 25, 2014
ef67e42
Improve documentation
yyosifov Nov 25, 2014
e3ea411
Adding Handling Multiple Notifications on Android devices
yyosifov Nov 25, 2014
e6c66f5
Update README.md
AntonDobrev Nov 25, 2014
0eb442a
Merge pull request #5 from AntonDobrev/patch-1
yyosifov Nov 25, 2014
4c44718
Add concrete version of the plugin for Multiple Notifications section
yyosifov Nov 26, 2014
88d8724
Update README.md
AntonDobrev Nov 26, 2014
284a8ad
Merge pull request #6 from AntonDobrev/patch-2
yyosifov Nov 26, 2014
d62345a
Add more details for the sample applications
yyosifov Nov 26, 2014
7891586
Merge branch 'master' into documentation
yyosifov Nov 27, 2014
39a6058
Merge remote-tracking branch 'origin/master'
EddyVerbruggen Nov 29, 2014
3850009
Added globalization as a dependency for easy integration with Telerik…
EddyVerbruggen Nov 29, 2014
35311c6
Added globalization plugin as a dependency for easy integration with …
EddyVerbruggen Nov 29, 2014
dd6873e
Added feedback when an invalid type is passed to registerUserNotifica…
EddyVerbruggen Dec 1, 2014
068b821
Adding URL for the plugin documentation
yyosifov Dec 12, 2014
8462841
Remove amazon os from the supported OS
yyosifov Dec 15, 2014
54fc7ce
Remove support for Blackberry
yyosifov Dec 15, 2014
06673b9
enabledRemoteNotificationTypes is deprecated in iOS8+
yyosifov Dec 16, 2014
afc96a3
Merge pull request #7 from Telerik-Verified-Plugins/interactive-push-fix
EddyVerbruggen Dec 16, 2014
14be349
Merge remote-tracking branch 'origin/master'
EddyVerbruggen Dec 18, 2014
deb541a
Execute notification received whenever a interactive action has been …
yyosifov Dec 19, 2014
b0248ba
Merge pull request #8 from Telerik-Verified-Plugins/interactive-push-fix
EddyVerbruggen Dec 19, 2014
dbd0834
Fix handling the Action of an Interactive Push
yyosifov Jan 23, 2015
c0d82cd
Merge pull request #9 from Telerik-Verified-Plugins/interactive-push-fix
EddyVerbruggen Jan 23, 2015
778a467
Merge branch 'master' into interactive-push
Jan 23, 2015
ec34188
Merge pull request #10 from Telerik-Verified-Plugins/interactive-push
yyosifov Jan 23, 2015
0619a0e
Note Interactive push notifications available from v.2.5.
AntonDobrev Jan 23, 2015
3387962
Add check to ensure the features are available for the device (beside…
Jan 26, 2015
fa10d13
Fix was tested only on iOS7... The if should be reversed.
Jan 26, 2015
1b173fa
Merge pull request #11 from AntonDobrev/patch-3
yyosifov Jan 26, 2015
b59a09b
Merge pull request #12 from Telerik-Verified-Plugins/interactive-push
yyosifov Jan 26, 2015
d20a905
updated strings to allow for private phonegap repo in phonegap build
Jan 27, 2015
1a04e29
updated strings to allow for private phonegap repo in phonegap build
Jan 27, 2015
b23410e
cahnged version to comply with phonegap build settings
Jan 27, 2015
da139d5
Merge remote-tracking branch 'origin/master'
EddyVerbruggen Jan 29, 2015
441679f
#13 Support custom sound on Android device
EddyVerbruggen Jan 29, 2015
db0defe
#14 Update to GoogleCloudMessaging API - gets rid of GET_ACCOUNTS per…
EddyVerbruggen Feb 17, 2015
db45fb4
#14 Update to GoogleCloudMessaging API - gets rid of GET_ACCOUNTS per…
EddyVerbruggen Feb 26, 2015
a81290a
WP8 3.7.0+ fix for register function
EddyVerbruggen Mar 1, 2015
e7705be
Add support for custom Android push icon
EddyVerbruggen Mar 1, 2015
cef72a7
Merge pull request #15 from Telerik-Verified-Plugins/GCM-without-acco…
yyosifov Mar 6, 2015
e9198ed
Merge pull request #16 from Telerik-Verified-Plugins/CB-8580-compatib…
yyosifov Mar 6, 2015
ba9f4e6
Update PushPlugin.m
klh Mar 17, 2015
5f7e3f8
Revert "Update PushPlugin.m"
threads Mar 17, 2015
794b3e4
Merge remote-tracking branch 'origin/master'
EddyVerbruggen Apr 1, 2015
52bc0be
Update Android support lib to avoid conflicts with plugins using the …
EddyVerbruggen Apr 1, 2015
ea301be
#19 Compatibility issue with iOS 7 devices
EddyVerbruggen Apr 15, 2015
e814d43
Merged changes from master
jeiler Apr 16, 2015
c6186a7
Update plugin.xml
jeiler Apr 16, 2015
fa4866c
Fixed preference issue
jeiler May 11, 2015
a1cd2ac
Fixed preference issue
jeiler May 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Example/server/pushGCM.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
require 'pushmeup'
GCM.host = 'https://android.googleapis.com/gcm/send'
GCM.format = :json
GCM.key = "API_KEY_GOES_HERE"
destination = ["REGISTRATION_ID_GOES_HERE"]
data = {:message => "PhoneGap Build rocks!", :msgcnt => "1", :soundname => "beep.wav"}
GCM.key = "AIzaSyBUhVPJ2-i_ae6HDihsjCzHMHWdeCrHS6c"
destination = ["APA91bFOtOXXF6nbzdPDbESlDqrnH5nyr3gONb5BhNXjNFghVY_3eYxd0eKpzXlkbAFZ5y-bOZ9xfq2dSwckXhg0jaAlDuuCpHsHExyHGXysPoXhkQVaRXDtkUJDq0md7pixCSfaTKBJTEJ1Ewf751vCQz8ghDg_OwBwMMoVwMZfvXopUmfK2th9sXuWlR4HNpG6-zdKPVMj"]
data = {:message => "Telerik AppBuilder ftw!", :msgcnt => "1"}

GCM.send_notification( destination, data)
65 changes: 0 additions & 65 deletions Example/www/PushNotification.js

This file was deleted.

67 changes: 33 additions & 34 deletions Example/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>

/*
<!--
NOTE:
This demo uses these plugins:
Cordova Device Plugin: http://plugins.cordova.io/#/package/org.apache.cordova.device
Expand All @@ -14,22 +14,21 @@
To add them via the CLI:
$ cordova plugin add org.apache.cordova.device
$ cordova plugin add org.apache.cordova.media
*/
<!--<script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"></script>-->
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8" src="jquery_1.5.2.min.js"></script>
<script type="text/javascript" src="PushNotification.js"></script>

-->

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

<script type="text/javascript">
var pushNotification;

function onDeviceReady() {
$("#app-status-ul").append('<li>deviceready event received</li>');

document.addEventListener("backbutton", function(e)
{
$("#app-status-ul").append('<li>backbutton event received</li>');

if( $("#home").length > 0)
{
// call this to get a new token each time. don't call it to reuse existing token.
Expand All @@ -42,9 +41,9 @@
navigator.app.backHistory();
}
}, false);
try
{

try
{
pushNotification = window.plugins.pushNotification;
$("#app-status-ul").append('<li>registering ' + device.platform + '</li>');
if (device.platform == 'android' || device.platform == 'Android' ||
Expand All @@ -54,37 +53,37 @@
pushNotification.register(tokenHandler, errorHandler, {"badge":"true","sound":"true","alert":"true","ecb":"onNotificationAPN"}); // required!
}
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.message + "\n\n";
alert(txt);
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.message + "\n\n";
alert(txt);
}
}

// handle APNS notifications for iOS
function onNotificationAPN(e) {
if (e.alert) {
$("#app-status-ul").append('<li>push-notification: ' + e.alert + '</li>');
// showing an alert also requires the org.apache.cordova.dialogs plugin
navigator.notification.alert(e.alert);
}

if (e.sound) {
// playing a sound also requires the org.apache.cordova.media plugin
var snd = new Media(e.sound);
snd.play();
}

if (e.badge) {
pushNotification.setApplicationIconBadgeNumber(successHandler, e.badge);
}
}

// handle GCM notifications for Android
function onNotification(e) {
$("#app-status-ul").append('<li>EVENT -> RECEIVED:' + e.event + '</li>');

switch( e.event )
{
case 'registered':
Expand All @@ -96,15 +95,15 @@
console.log("regID = " + e.regid);
}
break;

case 'message':
// if this flag is set, this notification happened while we were in the foreground.
// you might want to play a sound to get the user's attention, throw up a dialog, etc.
if (e.foreground)
{
$("#app-status-ul").append('<li>--INLINE NOTIFICATION--' + '</li>');
// on Android soundname is outside the payload.

// on Android soundname is outside the payload.
// On Amazon FireOS all custom attributes are contained within payload
var soundfile = e.soundname || e.payload.sound;
// if the notification contains a soundname, play it.
Expand All @@ -120,38 +119,38 @@
else
$("#app-status-ul").append('<li>--BACKGROUND NOTIFICATION--' + '</li>');
}

$("#app-status-ul").append('<li>MESSAGE -> MSG: ' + e.payload.message + '</li>');
//android only
$("#app-status-ul").append('<li>MESSAGE -> MSGCNT: ' + e.payload.msgcnt + '</li>');
//amazon-fireos only
$("#app-status-ul").append('<li>MESSAGE -> TIMESTAMP: ' + e.payload.timeStamp + '</li>');
break;

case 'error':
$("#app-status-ul").append('<li>ERROR -> MSG:' + e.msg + '</li>');
break;

default:
$("#app-status-ul").append('<li>EVENT -> Unknown, an event was received and we do not know what it is</li>');
break;
}
}

function tokenHandler (result) {
$("#app-status-ul").append('<li>token: '+ result +'</li>');
// Your iOS push server needs to know the token before it can push to this device
// here is where you might want to send it the token for later use.
}

function successHandler (result) {
$("#app-status-ul").append('<li>success:'+ result +'</li>');
}

function errorHandler (error) {
$("#app-status-ul").append('<li>error:'+ error +'</li>');
}

document.addEventListener('deviceready', onDeviceReady, true);

</script>
Expand Down
16 changes: 0 additions & 16 deletions Example/www/jquery_1.5.2.min.js

This file was deleted.

Loading