Barcode scanner start event

I am using the Barcode scanner native plugin.
When the plugin is invoked none of the nav controller events are triggered. So ionViewWillLeave, ionViewDidLeave and ionViewWillUnload are not triggered.
But when returning from the camera, either with cancel or once a barcode is scanned correctly then the constructor of the class is re-run. So the page is reloaded.

The issue I have is that it then subscribes to platform resume twice which causes loads of further issues.
I would expect either one of the nav controller events to be triggered or the class to not be re-loaded.

I presume this is an issue with the ionic native plugin wrapper.

I looked in the ionic native plugin wrapper code but don’t know how I should trigger the event in there.

In the end I made a work around.
I set a variable in an external provider service. Set the flag to say camera is in use when in use. The subscription function checks if the use camera flag is false before executing.