简体   繁体   中英

Cordova plugins became undefined after restoring application

I'm working on html5/css3 application based on angularjs. And building this into android application using cordova 3.5.0. Everything works fine until I hide application using 'home' button on the phone and then restore it: after that whole app reloads, and plugins became undefined.

Any ideas why this happening and how to fix it? Maybe I need to clarify something about project structure?

I wanted to try calling plugins using cordova .exec() but this method is undefined as well.

Well, I figured out what's the problem and I feel really stupid right now. There is an option in dev options: "Don't keep activities", I was testing application on my co-worker's device and this option was turned on(I believe it turned off by default), so it was the root of a problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM