arnesson/cordova-plugin-firebase

How to create an event in cordova which should trigger when a child in firebase realtime db changes

sandeepks1 opened this issue · 0 comments

Could you please help me to fix the below code, I need an event that should trigger when any child changes, Similar code works perfectly on the web app but when I am trying with Cordova android am getting an error Uncaught TypeError: firebaseThings.on is not a function
plugin I am using :https://www.npmjs.com/package/cordova-plugin-firebase

                                var firebaseThings = window.FirebaseDatabasePlugin.ref(value); 
                            firebaseThings.on('child_changed', (snapshot) => {
                            console.log('user was changed !!') ;
                            if(snapshot.key=="offersdp")
                            {
                            alert(snapshot.value);
                            }

                            });