firebase-realtime-database

How to search Firebase text by lower case also? [duplicate]

二次信任 提交于 2019-12-24 23:32:44
问题 This question already has an answer here : firebase query methods startAt() taking case sensitive parameters (1 answer) Closed last year . I am using Firebase database for my Android Application. I implemented search feature in the app. On my database, every title start with "A" is showing only when I started a search with Capital "A". When I entered lower case "a" it showing no results found. I want to enable search for lower case variation also. Help me, please. Thank you. Here is my search

why is this problem “Can't create handler inside thread” happening on realtime database?

天大地大妈咪最大 提交于 2019-12-24 23:26:48
问题 so i'm trying to call realtime database from inside a firebasemessagingservice to get some infos from the database but each and every time the app is on background this error is happening 09-17 19:27:21.596 4083-4140/? E/AndroidRuntime: FATAL EXCEPTION: Firebase-MyFirebaseMessagingService Process: com.kirtu.simpletexts.texts, PID: 4083 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:200) at android

How to save, with anonymous authentication, to Firebase database - using Flutter

梦想的初衷 提交于 2019-12-24 23:16:08
问题 I'm getting permission denied after I have authenticated with Anonymous Auth [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception: E/flutter (21033): PlatformException(-3, Permission denied, ) ... _getCurrentUser: FirebaseUser({providerId: firebase, uid: DOIL...............u54j1, displayName: , email: , isAnonymous: true, isEmailVerified: false, providerData: [{providerId: firebase, uid: DOIL//////////////54j1, displayName: , email: }]}) My rules on the Firebase DB are {

Firebase For Android Studio - How do you loop through each item in a database?

≡放荡痞女 提交于 2019-12-24 23:12:49
问题 I have a firebase real-time database that looks like this: I want to create a button in this format: How do I do this? Each Button should also do this: Intent intent = new Intent(getBaseContext(), FishInfo.class); intent.putExtra("typeName", "Barbs"); intent.putExtra("typeInfo", "Sample Description..."); startActivity(intent); But use the correct typeName and typeInfo Thank you in advance 回答1: To iterate in the above database, try this:- DatabaseReference ref=FirebaseDatabase.getInstance()

Check if user exists with username using Swift and Firebase

随声附和 提交于 2019-12-24 22:39:07
问题 I'm currently trying to code a function who pass the user Data when user exists. When the username is in the database, the code is okay, but if there is no username recorded in the database I don't know how to have a return function. I'm beginner, this is what I did: func observeUserByUsername(username: String, completion: @escaping (Userm?) -> Void) { REF_USERS.queryOrdered(byChild: "username_lowercase").queryEqual(toValue: username).observeSingleEvent(of: .childAdded) { (snapshot) in if let

Retrieve Current User's Data (user_id) Firebase?

无人久伴 提交于 2019-12-24 22:04:34
问题 firebaseAuth = FirebaseAuth.getInstance(); mDatabase = FirebaseDatabase.getInstance(); mDb = mDatabase.getReference(); FirebaseUser user = firebaseAuth.getCurrentUser(); userKey = user.getUid(); mDb.child(userKey).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { Log.d(TAG, "Name: " + dataSnapshot.child("user_id").getValue()); userID = String.valueOf(dataSnapshot.child("user_id").getValue()); } @Override public void onCancelled

Sync device contact list with Firebase using MVVM (Android Architecture Components)

橙三吉。 提交于 2019-12-24 21:26:47
问题 I've always used the structure below to identify whether a user has an account in my app. All of this code is placed in MainActivity , but Google Architecture Components suggests to separate UI from the back-end logic. I've followed the example below for integrating the contact list with MVVM structure. https://github.com/NaarGes/Android-Contact-List But I don't know how to insert the Firebase Realtime Database validation. private void getContactList(){ Cursor phones = getContext()

Load only x items in Firebase Recycler Adapter

我们两清 提交于 2019-12-24 21:23:37
问题 Hi so I have one Firebase FirebaseRecyclerAdapter and in my Firebase project in my database I have over 30 values and in my app I want to display only the first x items. I searched on internet but I didn't find how I could load only x items. This is my code: mAdapter = new FirebaseRecyclerAdapter<Post, Holder>( Post.class, R.layout.item_layout, Holder.class, mRef ){ @Override public void onBindViewHolder(Holder viewHolder, int position) { Post post = (Post) this.getItem(position); ((Holder)

Querying friend of friends with Swift

大城市里の小女人 提交于 2019-12-24 21:12:28
问题 I'm trying to pull a list of my friends and my friend's friends using Firebase. Right now, I'm pulling my list of friends and then looping through their friends to pull their user ID. I would like to append it to a single array with the output ["friendID1","friendID2", "friendID3", "friendID4","friendID5"]. My code so far: Database.database().reference().child("friends").child(myID).observeSingleEvent(of: .value, with: { (snapshot : DataSnapshot) in for child in snapshot.children.allObjects

Firebase recycleradapter displaying wrong information Android

我只是一个虾纸丫 提交于 2019-12-24 21:05:48
问题 My app uses a firebase RecyclerAdapter to display "plant" entities in an activity. I made it so that if I longclick on an entity displayed in Cardview format using a ViewHolder and the RecyclerAdapter it will prompt to perform a delete and delete the plant entity + image on the firebase database and storage. Deleting and adding plants work without a hitch on the backend as I can confirm this on my firebase database. However, when I delete a "plant" entity and add a new one, the CardView shows