You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,
im using SDK 5.4.0 GA and 1.7 version of the module
this is my code
var gcm = require("nl.vanvianen.android.gcm");
/* If the app is started or resumed act on pending data saved when the notification was received */
var lastData = gcm.getLastData();
if (lastData) {
Ti.API.info("Last notification received " + JSON.stringify(lastData));
gcm.clearLastData();
}
gcm.registerPush({
senderId : 'XXXXXXXX',
notificationSettings : {
sound : '', /* Place sound file in platform/android/res/raw/mysound.mp3 */
smallIcon : 'appicon.png', /* Place icon in platform/android/res/drawable/notification_icon.png */
largeIcon : 'appicon.png', /* Same */
vibrate : true, /* Whether the phone should vibrate */
insistent : true, /* Whether the notification should be insistent */
group : 'MyNotificationGroup', /* Name of group to group similar notifications together */
localOnly : false, /* Whether this notification should be bridged to other devices */
priority : +2, /* Notification priority, from -2 to +2 */
bigText : true,
/* You can also set a static value for title, message, or ticker. If you set a value here, the key will be ignored. */
// title: '',
// message: '',
// ticker: ''
/* Add LED flashing */
ledOn : 200,
ledOff : 300
},
success : function(event) {
Ti.API.info("Push registration success: " + JSON.stringify(event));
synchronize(event);
},
error : function(event) {
Ti.API.error("Push registration error: " + JSON.stringify(event));
alert("Fail to register for remote push notification");
},
callback : function(event) {
Ti.API.info("Push callback = " + JSON.stringify(event));
// Called when a notification is received and the app is in the foreground
//TODO print message notification
var dialog = Ti.UI.createAlertDialog({
title : 'Push received',
message : JSON.stringify(event.data),
buttonNames : ['View', 'Cancel'],
cancel : 1
});
dialog.addEventListener("click", function(event) {
dialog.hide();
if (event.index == 0) {
//Do stuff to view the notification
}
});
dialog.show();
}
});
and i got a success registration and just after an error message
I too have seen concurrent modification errors on our servers at the API the endpoint which is used to save the device tokens obtained from successful registration. Highly likely that it is due t the duplicate registration reported.
hello,
im using SDK 5.4.0 GA and 1.7 version of the module
this is my code
and i got a success registration and just after an error message
and just after
something missing? im sure that im calling this library one time !
The text was updated successfully, but these errors were encountered: