PhoneGap中文网

 找回密码
 立即注册
查看: 13667|回复: 1

关闭app,极光推送无法收到的问题。大神救救我

[复制链接]

11

主题

26

帖子

130

积分

注册会员

Rank: 2

积分
130
发表于 2016-8-26 15:59:18 | 显示全部楼层 |阅读模式
各位大神你们好:我遇到了一个关闭app,极光推送无法收到的问题,我查过资料,要用到cordova-plugin-background-mode插件   我也按照给的例子写了document.addEventListener('deviceready', function () {

    // Android customization
    cordova.plugins.backgroundMode.setDefaults({ text:'Doing heavy tasks.'});
    // Enable background mode
    cordova.plugins.backgroundMode.enable();

    // Called when background mode has been activated
    cordova.plugins.backgroundMode.onactivate = function () {
        setTimeout(function () {
            // Modify the currently displayed notification
            cordova.plugins.backgroundMode.configure({
                text:'Running in background for more than 5s now.'
});
        }, 2000);
    }
}, false);
可cordova.plugins.backgroundMode.onactivate就是进不去,拜托各位能帮帮我。。。。。

感谢


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-3-29 19:44 , Processed in 0.038150 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表