Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sandeepks1 opened this issue Nov 11, 2021 · 0 comments

Comments

@sandeepks1
Copy link

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);
                            }

                            });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant