Sets an event listener that runs when the Cordova Activity is "destroyed". Note that this event does not always run before a program is removed from memory (see below link and image).
window.plugins.OnDestroyPlugin.setEventListener (function)
Sets an event listener that runs when the Cordova Activity stops.
License: MIT License
Sets an event listener that runs when the Cordova Activity is "destroyed". Note that this event does not always run before a program is removed from memory (see below link and image).
window.plugins.OnDestroyPlugin.setEventListener (function)
Here is the steps that I applied
1-> I installed plugin that I mentioned above
2-> Here is the code inside app.js
.
.
.
$ionicPlatform.ready(function() {
window.plugins.OnDestroyPlugin.setEventListener (function() {
localStorage.setItem("OnDestroyPlugin", true);
});
});
.
.
.
3-> application is terminated
4-> application opened
5-> localStorage has not been added
Hi,
I tried too to make your plugin work, without success yet.
Well, I've seen that your main branch it was mapped on OnDestroyPlugin.
I tried therefore the following
window.plugins.OnDestroyPlugin.setEventListener(function(){ alert('test')})
I tried also your #ondestroy branch , with changing the name of the plugin
window.plugins.OnDestroy.setEventListener(function(){ alert('test')})
My use case is the following :
Any suggestions ?
What am I doing wrong ?
Hi,
After rename window.plugins.OnDestroy. to window.plugins.OnDestroyPlugin and add a log error in the exec function in javascript I get a Class Not Found error.
I checked all configs files but I din't notice wrong compare to other Cordova's Plugin.
Have you an idea ?
Thanks
kindly add this plugin in www.npmjs.com. So we may use it in the build.phonegap.com apps.
Thanks
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.