firebase-realtime-database

Retrieve only childAdded from firebase to my listener in firebase

允我心安 提交于 2021-01-29 02:45:28
问题 I currently have this python script running # Setup Firebase Listner # Retrieve the data from Firebase and do the analysis # Append the data to Firebase from firebase_streaming import Firebase # Firebase object fb = Firebase('https:***************.firebaseio.com/') # Callback function to Analyze the data for a Faulty Motor def performAnalysis_FaultyMotor(x): print(x) def performAnalysis_motor(x): print(x) # Declaring Custom callback definitions for the faulty and motor data custom_callback

Widgets aren't being casted. how do I fix it?

送分小仙女□ 提交于 2021-01-28 22:11:45
问题 Whenever I click the sign in button in my app, it just crashes and shows an error. Here is my activity_sign_in.xml and my SignIn.java. activity_sign_in.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@mipmap/background1" tools:context=".SignIn"> <LinearLayout android

Listener's onDataChange() is not called by Firebase. Could not use new Google-Firebase on Java client, not Android

只谈情不闲聊 提交于 2021-01-28 21:43:41
问题 I've being trying for a week right now to migrate from Firebase to google-firebase on a Java Client. One important detail is that the client will run in a controlled environment so I can allow some key to be stored locally. After my studies I could find three ways based on this tutorial. As a "server" using the service account key the onDataChange() callback is not being called. This is the solution I put more effort and the one I still believe. I'll put my code forward on this question. I'm

Does Realtime database has atomic increment method for Flutter like ServerValue.increment?

痴心易碎 提交于 2021-01-28 21:12:48
问题 Transaction is an atomic process but that means we need to read the data prior to incrementing it. We can easily implement ServerValue.increment(1) in Node.js but in Flutter we only have ServerValue.timestamp according to the documentation here although the Google documentation has it And so far I search I haven't found anything yet. Am I missing something? 来源: https://stackoverflow.com/questions/63275901/does-realtime-database-has-atomic-increment-method-for-flutter-like-servervalue

Firebase, retrieving data asynchronously

混江龙づ霸主 提交于 2021-01-28 19:29:37
问题 I wrote a promise in javascript to delay an animation until some data is retrieved from my firebase database. The problem is that for some reason the promise isn't working, and the code isn't running asynchronously. Am i not using this promise properly, or is there another issue? var name = document.querySelector('.name') new Promise (function() { firebase.database().ref('users/' + userId ).on('value', function(snap) { console.log('first'); name.innerText = snap.child('name').val(); }); })

iOS Swift - Firebase query never gets called

℡╲_俬逩灬. 提交于 2021-01-28 18:39:30
问题 I just want to make a query and search if an email exists, but my query never gets called. This is my code: func emailAvailable(email: String, completion: (result: String)-> Void){ let ref = self.dbRef.child("usuarios") ref.queryOrderedByChild("emailUsuario").queryEqualToValue(email).observeSingleEventOfType(.Value, withBlock: { snapshot in //NEVER ENTER HERE if snapshot.exists(){ completion(result: "N") }else{ completion(result: "Y") } }) } For test I only have this in my realtime Database:

failed: DatabaseError: Permission denied Firebase the user is being created but database is not updating

痞子三分冷 提交于 2021-01-28 13:48:40
问题 This is account create activity : Here the user is being created but the unless i change the rules to read write rules to true the database is not getting updated. I only want the users database who is authorized. Please help class CreateAccountActivity : AppCompatActivity() { var mAuth: FirebaseAuth? = null var mDatabase: DatabaseReference? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_create_account) mAuth =

failed: DatabaseError: Permission denied Firebase the user is being created but database is not updating

依然范特西╮ 提交于 2021-01-28 13:46:43
问题 This is account create activity : Here the user is being created but the unless i change the rules to read write rules to true the database is not getting updated. I only want the users database who is authorized. Please help class CreateAccountActivity : AppCompatActivity() { var mAuth: FirebaseAuth? = null var mDatabase: DatabaseReference? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_create_account) mAuth =

Do Firebase Rules snapshots affect billing?

余生颓废 提交于 2021-01-28 13:46:24
问题 Do they count as downloads and connections to the database when I use the variables root, data or newData? 回答1: firebaser here The Firebase Realtime Database only charges you for the amount of data that is stored, and the bandwidth that is used sending data to various clients and servers. Data that is read in the database rules is not charged. 来源: https://stackoverflow.com/questions/61835251/do-firebase-rules-snapshots-affect-billing

File Uploaded but not shown in the Firebase realtime database - Android Studio

夙愿已清 提交于 2021-01-28 12:19:28
问题 In my android app when I am uploading a PDF file it's uploaded in the firebase storage but the file name and url is not shown in the realtime database. private void uploadPDFFile(Uri data) { final ProgressDialog progressDialog = new ProgressDialog(this); progressDialog.setTitle("Uploading..."); progressDialog.show(); StorageReference reference = storageReference.child("uploads/"+System.currentTimeMillis()+".pdf"); reference.putFile(data) .addOnSuccessListener(new OnSuccessListener<UploadTask