检查我的应用程序是否已使用Cordova运行

时间:2015-06-25 20:21:08

标签: javascript android cordova

有没有办法找到我的Phonegap应用程序是否在后台使用javascript或Cordova插件运行?

1 个答案:

答案 0 :(得分:0)

让它在定时的基础上写入控制台&然后在USB连接到PC或Mac时在调试器中运行它。如果它在后台运行,您将在控制台上看到您的消息。如果不是......不是。类似的东西:

// Write a message to the console every 15 seconds
var myTimer = setInterval(function() {
    console.log("Number 5 is alive!");
}, 15000);