CB-8139 WP8. Fix callback for plugins with native ui (capture, contactPicker, BarcodeScanner, other)

Unload event could not be used to detect when CordovaView is not used anymore. For example, this event is triggered when we execute command that shows some native elements on new page and then we return back. In this case Unloaded event is called but, but control state is preserved and we should continue to use that Cordova view instance.

This commit changes the following:
1. Allows command instances to be garbage collected => fixes corresponding memory leak so that NativeExecution is no more required to call DetachHandlers for each command. This fixes  CB-8139.
2. Use Loaded and Unloaded events to add/remove handlers for native events; this makes it possible for GC to destroy CordovaView when it is not required anymore
6 files changed
tree: 7dcd973e3bfb0fc421e15503078fe8e5ae85e6ff
  1. bin/
  2. framework/
  3. node_modules/
  4. template/
  5. .gitignore
  6. appveyor.yml
  7. CONTRIBUTING.md
  8. LICENSE
  9. NOTICE
  10. package.json
  11. README.md
  12. RELEASENOTES.md
  13. VERSION
README.md

Apache Cordova for Windows Phone 8

Build status

This repo includes code to build Apache Cordova applications that target Windows Phone 8 SDK.

An Apache Cordova based applications is, at the core, an application written with web technology: HTML, CSS and JavaScript.

Apache Cordova is a project at The Apache Software Foundation (ASF).

Requires

  • Windows Phone SDK 8 -- Windows Phone 8 development requires Windows 8 Professional, and Visual Studio 2012 ( express works )

Getting Started

Create a new project

Getting Started from the command line

>.\wp8\bin\create PathToNewProject [ PackageName ] [ AppName ]

>PathToNewProject : The path to where you wish to create the project
>PackageName      : The namespace for the project (default is Cordova.Example)
>AppName          : The name of the application (default is CordovaWP8AppProj)

>example:
>.\wp8\bin\create C:\Users\anonymous\Desktop\MyWP8Proj io.cordova.example CordovaWP8App

From here you can open it in Visual Studio:
- Launch Visual Studio and open Solution file (.sln) in (C:\Users\anonymous\Desktop\MyWP8Proj)
- Built and Run it

Or, you can continue with the command line:
- >cd C:\Users\anonymous\Desktop\MyWP8Proj
  >cordova\run

BUGS?

Further Reading