Thanks Rajeev.
I realized that the issue occured because I was switching scenes instantly. Hence, I always got a null value.
To describe the issue in detail, in the first scene of my game, I load a game object for which I use DontDestroyOnLoad (gameObject); because I want the game object to persist through all the scenes.
It is on this game object that I have added the appwarp class as a component.
The listener class is not a monobehaviour hence I create it as an object using -
Listener listener = new Listener();
This first scene also instantly loads the next scene.
Now my assumption was that since a persistant game object has the appwarp component attached to it, the listener which is an object of the appwarp component will also persist throughout the scene changes. However that's not the case and the listener does not execute.
Any clue why this does not happen?
I'm currently just running the game in unity editor and not building it for any platform.
The appwarp version is 1.10.1. Unity version is 5.6.
Mariam