我们使用phonegap cordova,node-gcm来发送推送通知。实际上我们的移动应用程序没有完成,它有登录屏幕,所以在登录成功后,我们向服务器发送设备toke。所以我们希望当我们发送推送通知时,它会打开浏览器并重定向到链接,这是可能的吗?
节点编码
var gcm = require('node-gcm');
var message = new gcm.Message();
//API Server Key
var sender = new gcm.Sender('ccxxxcdddd');
var registrationIds = [];
sender.send(message, registrationIds, 4, function (a,result) {
console.log("ok",a);
console.log("result",result);
});所以基本上我们想在点击推送通知后在浏览器中打开特定的链接。我们在移动设备上收到推送通知,但点击它就会打开应用程序
发布于 2015-10-06 14:18:19
我们使用window.open('http://www.kidzout.com', '_system');来解决这个问题。应用程序在暂停状态下运行,无需打开应用程序即可直接打开浏览器
https://stackoverflow.com/questions/32886416
复制相似问题