firebase-realtime-database

Firebase android works on the emulator but not on the device

久未见 提交于 2020-08-27 19:51:28
问题 I am new to android and I was able to setup the firebase for my app in kotlin. If i run the app in the Nexus 5X API 27 emulator I am able to get the database but when i run the app in the actual device SAMSUNG S5 (Google play Services V 12.5.29, android V 5.0) i don't get the addValueEventListener call back. ref = FirebaseDatabase.getInstance().reference ref!!.addValueEventListener(object : ValueEventListener { override fun onCancelled(p0: DatabaseError?) { Log.d("firebase", "cancelled") }

Update Firebase Realtime Database after specific time [duplicate]

心已入冬 提交于 2020-08-26 12:48:26
问题 This question already has answers here : Cloud Functions for Firebase trigger on time? (2 answers) Closed 2 years ago . Consider the following database in JSON format stored in firebase - "root": { "survey": { "1": { "survey_question":"Who is a better player?", "option1":"Ronaldo", "option2":"Messi", "time_posted":7854123265, "visibility":1 }, "2": { "survey_question":"Who is a better singer?", "option1":"Ed Sheeran", "option2":"Chris Martin", "time_posted":9865321245, "visibility":1 } } } I

Update Firebase Realtime Database after specific time [duplicate]

痞子三分冷 提交于 2020-08-26 12:46:39
问题 This question already has answers here : Cloud Functions for Firebase trigger on time? (2 answers) Closed 2 years ago . Consider the following database in JSON format stored in firebase - "root": { "survey": { "1": { "survey_question":"Who is a better player?", "option1":"Ronaldo", "option2":"Messi", "time_posted":7854123265, "visibility":1 }, "2": { "survey_question":"Who is a better singer?", "option1":"Ed Sheeran", "option2":"Chris Martin", "time_posted":9865321245, "visibility":1 } } } I

Update Firebase Realtime Database after specific time [duplicate]

被刻印的时光 ゝ 提交于 2020-08-26 12:46:21
问题 This question already has answers here : Cloud Functions for Firebase trigger on time? (2 answers) Closed 2 years ago . Consider the following database in JSON format stored in firebase - "root": { "survey": { "1": { "survey_question":"Who is a better player?", "option1":"Ronaldo", "option2":"Messi", "time_posted":7854123265, "visibility":1 }, "2": { "survey_question":"Who is a better singer?", "option1":"Ed Sheeran", "option2":"Chris Martin", "time_posted":9865321245, "visibility":1 } } } I

Getting JSON Key Value from Firebase Datasnapshot

半城伤御伤魂 提交于 2020-08-25 04:26:19
问题 Meanwhile I am developing a Flutter app with Firebase and it is enjoyable indeed, of course there is hassle to overcome... I setup a Firebase datastore, and through the firebase_database plugin I got a DataSnapshot returned as follow: FirebaseDatabase.instance.reference().child('users') .orderByChild('emailAddress') .equalTo('wonderjimmy@gmail.com').once() .then((onValue) { Map data = onValue.value; }); I use a Map object to keep this JSON. A stupid question: if I just want to get the value "

Firebase deploy error - Cannot find module 'firebase'

家住魔仙堡 提交于 2020-08-24 09:20:35
问题 I'm trying to deploy Google Cloud function triggers that trigger from db events, but when I run firebase deploy The functions aren't deployed properly and I get an error saying Error: Cannot find module firebase When I was first creating the project I could deploy functions without any issues. It's been a few days since I last deployed anything, but now I'm getting this issue on all my functions (not just my trigger functions) My function: exports.deleteNotificationOnUnlike = functions

Firebase deploy error - Cannot find module 'firebase'

这一生的挚爱 提交于 2020-08-24 09:19:38
问题 I'm trying to deploy Google Cloud function triggers that trigger from db events, but when I run firebase deploy The functions aren't deployed properly and I get an error saying Error: Cannot find module firebase When I was first creating the project I could deploy functions without any issues. It's been a few days since I last deployed anything, but now I'm getting this issue on all my functions (not just my trigger functions) My function: exports.deleteNotificationOnUnlike = functions

Firebase - Multi-location updates method deprecated, what now?

夙愿已清 提交于 2020-08-24 08:22:52
问题 I had some apps that used the multi-location update method as below: const updates = []; updates['/location1'] = data; updates['/location2'] = data2; firebase.database().ref().update(updates); Yet, as I'm developing a new app, I got the following message: FIREBASE WARNING: Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children. With no real info anywhere

Notify user when a date is near

有些话、适合烂在心里 提交于 2020-08-22 19:15:30
问题 I'm currently working on an Android app that uses several Firebase functions. In the Realtime Database I have a date (the date a book is due) and I need to notify the user when that date is near (say, 1 day before the date in the database). Firebase cloud functions doesn't seem to have a specific trigger to do this, as nothing in the database is changing. I have seen this thread, which can set an alarm/notification for a future date, but I don't know how to stop it once it's been set; I need

Notify user when a date is near

﹥>﹥吖頭↗ 提交于 2020-08-22 19:10:41
问题 I'm currently working on an Android app that uses several Firebase functions. In the Realtime Database I have a date (the date a book is due) and I need to notify the user when that date is near (say, 1 day before the date in the database). Firebase cloud functions doesn't seem to have a specific trigger to do this, as nothing in the database is changing. I have seen this thread, which can set an alarm/notification for a future date, but I don't know how to stop it once it's been set; I need