firebase-realtime-database

ClassNotFoundException DynamiteModuleInitializer Android

对着背影说爱祢 提交于 2019-12-22 08:22:24
问题 Since i updated my android studio and sdk. these errors started occurring at once and preventing me from writing to the a child in the database, i have no idea what the problem is. but it seems that when i'm trying to write to the database from the "EditCarPostActivity" activity it is occurring, From other activities i can write and update and retrieve information perfectly. Please help with this problem. I will post some activities below Error 1 04-29 18:38:54.685 11007-11034/com.example

Firebase servers not reachable when using mobile phone data (3g/4g)

六月ゝ 毕业季﹏ 提交于 2019-12-22 08:17:15
问题 I was running some FireBase tests and suddenly I realized Firebase was not working anymore when using mobile data from Chile. At the beginning I thought the problem was my app so I tried to open a Firebase official example but I had no luck (office-mover-demo example). This is what I tried: I connected the phone to my home wifi connection and FireBase works :) I shared the phone’s internet connection to my computer and it did not work :( . This is the error y receive. I emailed Firebase

Firebase query: Why is child_added called before the value query in the following code?

帅比萌擦擦* 提交于 2019-12-22 08:16:20
问题 I have a schema in Firebase that looks like this: messages/ $groupId/ $messageId/ message: 'Sample Message' createdBy: 'userID' createdAt: 1513337977055 Then I have the following queries executed consecutively in my code: // Get a specific message ref.child('messages/$groupId/$messageId') .once('value') .then(snap => console.log('value', snap.val())) // Start new message listener ref.child('messages/$groupId') .orderByKey() .limitToLast(1) .on('child_added', snap => console.log('child_added',

Firebase Accessing Snapshot Value Error in Swift 3

血红的双手。 提交于 2019-12-22 06:59:23
问题 I recently upgraded to swift 3 and have been getting an error when trying to access certain things from a snapshot observe event value. My code: ref.child("users").child(userID!).observeSingleEvent(of: .value, with: { (snapshot) in let username = snapshot.value!["fullName"] as! String let homeAddress = snapshot.value!["homeAddress"] as! [Double] let email = snapshot.value!["email"] as! String } The error is around the three variables stated above and states: Type 'Any' has no subscript

Firebase Reporting Options

浪子不回头ぞ 提交于 2019-12-22 06:55:16
问题 All my app's data is stored in Firebase. I'd like to build some reports with my data that aren't necessarily accessible through the web/app front-end. I don't see any good options for this in the Console. Has anyone found a good reporting solution for Firebase? I am looking for something like Crystal Reports or just an easy way to render Firebase data based on a query. Thanks, Rima. 回答1: I found a issue with the solution above. Firebase stores its data in JSON format, which cannot be consumed

React - filter by object property

拟墨画扇 提交于 2019-12-22 06:49:40
问题 I am trying to filter object by property but I can't make it work. Data in the object are structured like so: I am fetching data by the UID and then mapping all the items from that object but I can't make the filter work. Render method looks like so: render() { return( <div> {Object.keys(this.state.dataGoal) .filter(key => key.main == true) .map( (key, index) => { return <div key={key}> <h1>{this.state.dataGoal[key].name}</h1> <p>{this.state.dataGoal[key].main}</p> </div> })} </div> Any ideas

Computing firebase message size

China☆狼群 提交于 2019-12-22 05:53:09
问题 I am trying to compute the size of messages in firebase in order to accurately estimate the cost of my app. I noticed when running that the realtime database calculator was showing larger than expected data sizes. To verify this, I started a toy application that has a single ref called "test" with the data: {"foo": "bar"} Going on other answers, my estimate is that this data is under 20 bytes. Retrieving the data with this code: firebase.database().ref("test").once("value", function(snapshot)

Computing firebase message size

蓝咒 提交于 2019-12-22 05:53:09
问题 I am trying to compute the size of messages in firebase in order to accurately estimate the cost of my app. I noticed when running that the realtime database calculator was showing larger than expected data sizes. To verify this, I started a toy application that has a single ref called "test" with the data: {"foo": "bar"} Going on other answers, my estimate is that this data is under 20 bytes. Retrieving the data with this code: firebase.database().ref("test").once("value", function(snapshot)

Firebase get key string of a push

こ雲淡風輕ζ 提交于 2019-12-22 05:33:19
问题 I am doing a push action with setValue. mFirebaseDatabaseReference.child("loccheck").push().setValue(cloc); How do I retrieve the unique string created? P.S. I know how to do it with a push without setValue: String key = mDatabase.child("posts").push().getKey(); 回答1: You can get the unique key after you push like DatabaseReference newDatabaseReference = mDatabaseReference.child("loccheck").push(); newDatabaseReference.getKey(); or with setValue() mDatabaseReference.child("loccheck") .push()

No such module 'FirebaseDatabase'

会有一股神秘感。 提交于 2019-12-22 05:09:19
问题 I am developing iOS app with Swift 3 with Firebase database. My Podfile: target 'MyApp' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for MyApp pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Database' end I run pod install , which installs the pods. I created a class: import Foundation import FirebaseDatabase // Error: no such module 'FirebaseDatabase' class MyDatabase { var ref: DatabaseReference! ... } But I get