Hello Mario,
I continue thinking about your problem, and, I want to suggest you something to do, in order to see if everything is working as expected. First of all, if I am not wrong, you use the "DeviceReady" event, because you need to wait until the Cordova stuff (including the plugin you are using) are ready.
Again, if I am not wrong, the plugin that you use will open the app specifiying an app's view in particular, for that reason you want to know what app's view has been "loaded" on the "DeviceReady" event. My theory is that, for some reason, the plugin is always open the app from the main view.
I assume that the "view.name" variable is correct, so, if you are in the main view, the variable will show to you the main view name. In order to try all of these, I suggest to you to use the below code in the "DeviceReady" event:
With the above code you must see (in the alert) the below if you are in the main view of the app:
If you are in another view, the above alert will show you something like the below:
The idea is to check if certainly the plugin is loading the appropriate view, or, if as I think, the plugin is always loading the main view of the app. If I am not wrong, if the plugin is loading the "view2" correctly, then inside the "DeviceReady" you will see the expected value in "view.name", but also in "document.location.href".
So please, go ahead with this test and post here what you can see.
P.S. Maybe the plugin can launch / open your app while the app has been paused before: in this case the event that you must use is the "Resume" event, not the "DeviceReady", since this last one is only fired one time, when your app starts from scratch.