caffeinalab / gcm Goto Github PK
View Code? Open in Web Editor NEWThis module is no longer maintained, please use the updated Ti.Goosh
License: MIT License
This module is no longer maintained, please use the updated Ti.Goosh
License: MIT License
I'm very happy with how this module works when the app is in foreground or when it is closed; when it's open in the background, the callback is called as soon as the push is received, and nothing happens when the notification is clicked. I've tried to listen for the intent, with no success.
Should the module work this way, or am i possibly doing something wrong?
This is the code:
var gcm = require('it.caffeina.gcm');
gcm.registerForPushNotifications({
// you take this from the Google Developer Console, is the project ID
senderId: '505416032935',
// The callback to invoke when a notification arrives.
callback: pushNotificationCallback,
// The callback invoked when you have the device token.
success: function(e) {
Ti.API.info("::GCM::tokenReceived::"+JSON.stringify(e));
},
// The callback invoked on some errors.
error: function(err) {
Ti.API.error('::GCM::Notifications: Retrieve device token failed', err);
}
});
This is the log. Crash is definitely related to this module, because without it, it does not crash.
[TRACE] : GCMRegistrar: Registering app com.womala.womalaandroid of senders 505416032935
[TRACE] : GCMRegistrar: Creating pending intent to get package name
[DEBUG] : Module: Loading module: alloy/controllers/index -> Resources/alloy/controllers/index.js
[DEBUG] : Module: Loading module: alloy/controllers/BaseController -> Resources/alloy/controllers/BaseController.js
[WARN] : V8Object: (KrollRuntimeThread) [738,2366] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2366] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2367] Runtime disposed, cannot set property 'windowPixelFormat'
[WARN] : V8Object: (KrollRuntimeThread) [7,2374] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2374] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2374] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2374] Runtime disposed, cannot set property 'overScrollMode'
[WARN] : V8Object: (KrollRuntimeThread) [0,2374] Runtime disposed, cannot set property 'showPagingControl'
[WARN] : V8Object: (KrollRuntimeThread) [4,2378] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2379] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2379] Runtime disposed, cannot set property 'backgroundRepeat'
[DEBUG] : Module: Loading module: xp.ui -> Resources/xp.ui.js
[INFO] : IS RESUME (ANDROID) in index.js:false
[DEBUG] : Module: Loading module: alloy/controllers/TabbedIconBar -> Resources/alloy/controllers/TabbedIconBar.js
[WARN] : V8Object: (KrollRuntimeThread) [41,2420] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2420] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2420] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [4,2424] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2425] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [18,2443] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [12,2455] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2455] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2456] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [14,2470] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2470] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2470] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [12,2482] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [3,2485] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2485] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [16,2501] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2501] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2501] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [5,2506] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2506] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2506] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2507] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2507] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2507] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [6,2513] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2513] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2513] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2516] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2516] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2516] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2517] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2517] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2517] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2518] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2518] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2518] Runtime disposed, cannot set property 'backgroundRepeat'
[DEBUG] : Module: Loading module: alloy/controllers/ProfileViewNew -> Resources/alloy/controllers/ProfileViewNew.js
[WARN] : V8Object: (KrollRuntimeThread) [31,2549] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2549] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2549] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2551] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2551] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2551] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [5,2556] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2556] Runtime disposed, cannot set property 'contentOffset'
[WARN] : V8Object: (KrollRuntimeThread) [0,2556] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2556] Runtime disposed, cannot set property 'overScrollMode'
[WARN] : V8Object: (KrollRuntimeThread) [1,2557] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2557] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2557] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2560] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2560] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2560] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2562] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2562] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2562] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2564] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2564] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2564] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2565] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2565] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2565] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2566] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2566] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2566] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2567] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2567] Runtime disposed, cannot set property 'contentOffset'
[WARN] : V8Object: (KrollRuntimeThread) [0,2567] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2567] Runtime disposed, cannot set property 'overScrollMode'
[WARN] : V8Object: (KrollRuntimeThread) [3,2570] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2570] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2570] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2571] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2571] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2571] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2571] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2571] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2572] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [17,2589] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2589] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2589] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2590] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2590] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2591] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2592] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2592] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2592] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2593] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2593] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2593] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2596] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2596] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2596] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2596] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2596] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2596] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2597] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2597] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2597] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2599] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2599] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2600] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [6,2606] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2606] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2606] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2607] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2607] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2607] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2608] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2608] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2609] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [6,2615] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2615] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2615] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2616] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2616] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2616] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2617] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2617] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2617] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2617] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2617] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2617] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [5,2622] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2622] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2622] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2623] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2623] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2623] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2624] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2625] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2625] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2625] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2625] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2625] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2626] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2626] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2626] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2626] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2626] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2626] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2627] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2627] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2627] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2629] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2629] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2629] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2630] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2630] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2630] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2631] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2631] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2631] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2631] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2631] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2631] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2632] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2632] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2632] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2632] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2632] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2633] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2636] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2636] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2636] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2637] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2638] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2639] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2640] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2640] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2640] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2641] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2641] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2641] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2642] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2642] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2642] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2643] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2643] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2644] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2646] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2646] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2646] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2646] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2646] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2646] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2647] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2647] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2647] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2649] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2649] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2649] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2650] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2650] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2650] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2652] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2652] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2652] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2653] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2653] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2653] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2654] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2654] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2654] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2655] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2655] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2655] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2655] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2655] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2655] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2656] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2656] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2656] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2658] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2658] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2658] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2659] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2659] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2659] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2660] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2660] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2660] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2661] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2661] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2661] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2663] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2663] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2663] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2665] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2665] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2665] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2668] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2668] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2669] Runtime disposed, cannot set property 'backgroundRepeat'
[TRACE] : GCMBroadcastReceiver: onReceive: com.google.android.c2dm.intent.REGISTRATION
[TRACE] : GCMBroadcastReceiver: GCM IntentService class: it.caffeina.gcm.GCMIntentService
[DEBUG] : Module: Loading module: alloy/controllers/PlansView -> Resources/alloy/controllers/PlansView.js
[WARN] : V8Object: (KrollRuntimeThread) [35,2704] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2704] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2705] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2705] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2705] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2705] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2706] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2706] Runtime disposed, cannot set property 'contentOffset'
[WARN] : V8Object: (KrollRuntimeThread) [0,2706] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2706] Runtime disposed, cannot set property 'overScrollMode'
[WARN] : V8Object: (KrollRuntimeThread) [3,2709] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2710] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2710] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2713] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2713] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2713] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2714] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2714] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2714] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2715] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2715] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2715] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2716] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2716] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2716] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2718] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2718] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2720] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2720] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2720] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [7,2727] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2727] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2727] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [4,2731] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2731] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2731] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2732] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2732] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2732] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2732] Runtime disposed, cannot set property 'text'
[WARN] : V8Object: (KrollRuntimeThread) [0,2732] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2733] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2733] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2735] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2735] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2735] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2736] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [1,2737] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2737] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2737] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2737] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2737] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2738] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2738] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [1,2739] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2740] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2740] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2740] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2740] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2740] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2740] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [2,2742] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2742] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2742] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2743] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2743] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2743] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [1,2744] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2744] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2744] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2744] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2744] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2744] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [3,2747] Runtime disposed, cannot set property 'text'
[WARN] : V8Object: (KrollRuntimeThread) [0,2747] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2747] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2747] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [0,2747] Runtime disposed, cannot set property 'text'
[WARN] : V8Object: (KrollRuntimeThread) [1,2748] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2748] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2748] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [17,2765] Runtime disposed, cannot set property 'visible'
[WARN] : V8Object: (KrollRuntimeThread) [0,2765] Runtime disposed, cannot set property 'caseInsensitiveSearch'
[WARN] : V8Object: (KrollRuntimeThread) [0,2765] Runtime disposed, cannot set property 'enabled'
[WARN] : V8Object: (KrollRuntimeThread) [0,2765] Runtime disposed, cannot set property 'backgroundRepeat'
[WARN] : V8Object: (KrollRuntimeThread) [8,2773] Runtime disposed, cannot set property 'visible'
[WARN] : TiUIActivityIndicator: (main) [3,2776] Unable to create an activity indicator. Activity is null
[DEBUG] : AndroidRuntime: Shutting down VM
[INFO] : Process: Sending signal. PID: 1630 SIG: 9
[TRACE] : Uploaded tiapp metadata with Appcelerator Platform!
Hi,
Great work! Thank you!
There appear to bit of inconsistency problem - the expected message layout is not consistent with GCM specs. The module would work fine with the following message layout:
$json = '{
"registration_ids": ["DEVICETOKEN1", "DEVICETOKEN2"],
"data": {
"data":{
"alert":"ALERT",
"title": "My awesome app",
"sound": "default",
"priority": 2,
"vibrate": true
}
}
}';
but according to Google it should really work with this instead:
$json = '{
"registration_ids": ["DEVICETOKEN1", "DEVICETOKEN2"],
"data":{
"alert":"ALERT",
"title": "My awesome app",
"sound": "default",
"priority": 2,
"vibrate": true
}
}';
As a result the module is not receiving push notifications when those are sent with any of the popular gcm jars out there including this one: https://github.com/google/gcm.
In a way this is OK as long as the push messages from the app server are in the expected format, however, if one needed to send push notifications to different apps from the same server it would have been a lot simpler if all of them could use the same layout as per https://developers.google.com/cloud-messaging/http.
Should be a simple thing to change. I would not mind doing it too.
My test devices receive push notifications when the app is in the background (they vibrate), however, the operating system does not show a notification on the lock screen or in the notification center.
require('it.caffeina.gcm').registerForPushNotifications({
senderId: 'MY-GCM-SENDER-ID',
callback: function () {
// code to handle incoming notifications goes here
},
success: function (e) {
// registration success code goes here
},
error: function () {
Ti.UI
.createAlertDialog({
message: 'Error retrieving device token.'
})
.show();
}
});
$json = '{
"registration_ids": ["MY-DEVICE-ID"],
"data": {
"data":{
"alert":"ALERT",
"title": "My awesome app",
"sound": "default",
"vibrate": true
}
}
}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://android.googleapis.com/gcm/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: key=MY-API-KEY', 'Content-Type: application/json' ]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
echo curl_exec($ch);
curl_close($ch);
Hi, I was happy to find this module.
Can you help me how to used this in Titanium Alloy?
Great work with this plugin! I keep encountering an error though, but I'm not sure how te debug it (and if it's app-side or server side).
Error: No data found in the payload
The payload I'm sending from my node.js server:
let notification = {
sound: message.sound || 'default',
title: message.title || config.default_title || 'Notification title',
body: message.body || config.default_body || 'Notification body',
icon: message.icon || config.default_icon || 'appicon'
};
let msg = {
registration_ids: [ /* array of reg ids */ ],
type: 'android',
notification: notification,
collapse_key: 'appname',
time_to_live: 3,
delay_while_idle: true,
priority: 1,
data: message.data
};
Hello,
First of all thanks for the awesome module. I am having following issue with this module.
When I send multiple notification from the server only single notification is visible in notification area. Lats notification replaces the previous notification. Is it possible to show multiple notification using this module or this feature is not build in this module.
i am using the GSM module, and i have this error:
[ERROR] : TiExceptionHandler: (main) [139,1047] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,1047] - In app.js:100,36
[ERROR] : TiExceptionHandler: (main) [0,1047] - Message: Uncaught TypeError: Object # has no method 'setBadge'
[ERROR] : TiExceptionHandler: (main) [0,1047] - Source: require('it.caffeina.gcm').setBadge(2);
[ERROR] : V8Exception: Exception occurred at app.js:100: Uncaught TypeError: Object # has no method 'setBadge'
I am using the version 1.3.0 of Caffeine/GSM with
Appcelerator Studio 4.3.0.201509151348
SDK: 5.0.0.GA
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.