firebaseui

Firebase+RecyclerView: RecyclerView not displaying on application start

百般思念 提交于 2019-12-06 09:26:09
问题 I'm using the Android Studio provided class for a tabbed activity that uses Action Bar Tabs with ViewPager. Inside this activity, I'm trying to initialize a RecyclerView with data from a Firebase database. Problem: On the app's first run, the RecyclerView is empty as shown below. If I close and reopen the application from within the emulator, my RecyclerView gets populated as it should, as shown below. Any ideas as to why this might be happening? I have a theory but I haven't been able to

ReactJS app authentication: Firebase+FirebaseUI Uncaught Error: Firebase App named '[DEFAULT]-firebaseui-temp' already exists

六眼飞鱼酱① 提交于 2019-12-06 08:52:18
I'm having trouble with my code. I'm building a one page web app in ReactJS with 3 tabs. When the user goes to one tab, the authentication form from FirebaseUI should show up. The thing is that it's working only the first time and the second time, if I change to another tab and come back, it crashes, React re-renders the component that renders the div with the authentication form and throws the error: "firebase.js:26 Uncaught Error: Firebase App named '[DEFAULT]-firebaseui-temp' already exists." My index.html is : <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name=

FirebaseUI Auth library: Google sign in fails with: W/AuthMethodPicker: Firebase login unsuccessful

孤街醉人 提交于 2019-12-06 06:25:00
问题 Using the available online documentation and this video: https://www.youtube.com/watch?v=0ucjYG_JrEE, I'm trying to start apply the new UI Auth library. Mail sign in works great, the Google sign in not: it gives a warning and the UI keeps showing the "Loading..." dialog. final FirebaseAuth auth = FirebaseAuth.getInstance(); auth.addAuthStateListener(new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser usr =

New FUITableViewDataSource - how to use? Swift 3

假如想象 提交于 2019-12-06 03:25:08
问题 Just updated to the newer FirebaseUI Pod - a few things have changed but one of the big ones is the way that the FUI Table View works. I had it working well on an older version but am struggling with this below - and the lack of documentation/examples. self.dataSource = FUITableViewDataSource(query: <#T##FIRDatabaseQuery#>, view: <#T##UITableView#>, populateCell: <#T##(UITableView, IndexPath, FIRDataSnapshot) -> UITableViewCell#>) I don't understand where the indexpath is being called from.

Filtering data before populating view from FirebaseRecyclerAdapter

若如初见. 提交于 2019-12-05 23:38:38
Taking reference from FireChat app I used FirebaseRecyclerAdapter in my app, it is working fine but I need to filter data which equals to specific user ID. In populateView if I does that data is getting filtered but a blank recycler Item item is also getting created. mFirebaseAdapter = new FirebaseRecyclerAdapter<Tags, TagsViewHolder>( Tags.class, R.layout.item_message, TagsViewHolder.class, mFirebaseDatabaseReference.child("tags")) { @Override protected void populateViewHolder(TagsViewHolder viewHolder, Tags tags, int position) { mProgressBar.setVisibility(ProgressBar.INVISIBLE); if((tags

Only populate viewHolder with messages retrieved from database?

99封情书 提交于 2019-12-05 23:04:13
问题 I'm following the Android Firebase Codelab. Here's the project of the Friendly Chat app I'm attempting to modify: https://github.com/firebase/friendlychat-android/tree/master/android I want the MessageViewHolder to be populated only after retrieving a message from the database. Unfortunately, right now, MessageViewHolder also gets populated locally (after the user presses 'SEND'). I don't want the latter to happen. That means the view holder gets updated twice (once locally and once after

How to sort Firebase Keys in ascending order?

无人久伴 提交于 2019-12-05 22:41:53
I have a list of products in my Firebase Database. My SKU looks like this c08p10 . But the problem is that Hundred product is shown after the tenth product. Please refer the screenshot for the jumbled product order. I can understand that the products are arranging alphabetically. But how can i display the products in the below order c08p10 c08p11 c08p12 NOTE I can populate the data in a List view or recycler View. But the products are arranged in the firebase DB order. If I try to reverse the order. It gives the below structure. c08p118 c08p117 c08p116 Firebase keys are strings. And when you

How to update a FirebaseRecyclerAdapter's query

為{幸葍}努か 提交于 2019-12-05 21:13:54
问题 If I have a Query a , and I'm setting it to a FirebaseRecyclerAdapter . Then, I want to constantly create a new Query and update the FirebaseRecyclerAdapter . E.G: query = database.orderByChild("child"); query2 = database.orderByChild("child2"); adapter = new FirebaseRecyclerAdapter<...>(...,...,...,query){ ... } Now, after 3 seconds, I'm looking for a method to change the query. Similar to this: adapter.setQuery(query2); Is there an existing method for this? Or was Firebase, like always, too

FirebaseUI Authentication with Facebook not logging in

穿精又带淫゛_ 提交于 2019-12-05 19:47:47
I'm using FirebaseUI Auth in Android for user authentication. Dependencies in my app build.gradle for Facebook Login: compile 'com.google.firebase:firebase-auth:11.0.0' compile 'com.firebaseui:firebase-ui-auth:2.0.0' compile 'com.facebook.android:facebook-android-sdk:[4,5)' Classpath dependencies in my project build.gradle: classpath 'com.google.gms:google-services:3.1.0' My FirebaseUI Authentication Code in my Activity onCreate(): final AuthUI.IdpConfig facebookIdp = new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER) .setPermissions(Arrays.asList("email", "public_profile")) .build();

Android FirebaseRecyclerAdapter populateViewHolder() never get called

风格不统一 提交于 2019-12-05 18:47:44
I have a firebase data structure like below. I'm trying to load this data with a FirebaseRecyclerAdapter. The issue is that the populateViewHolder() does not get called. The reference to the database structure works. I can read the data with a friendsRef.addValueEventListener. What I like to avoid with the FirebaseRecyclerAdapter.(Code below) The data structure is: -users |-<uid> |-friends |-<uid>:name1 |-<uid>:name2 Authentication call in the main Activity private void firebaseAuthWithGoogle(GoogleSignInAccount acct) { AuthCredential credential = GoogleAuthProvider.getCredential(acct