firebaseui

How to retrieve data from Firebase Database with join if key only return true?

无人久伴 提交于 2019-12-08 05:33:38
问题 I want to ask how to retrieve group that only user2 join in Android? "users": { "user1": { "name": "User 1" }, "user2": { "name": "User 2" } } "groups": { "groupA": { "name": "A Group" }, "groupB": { "name": "B Group" } } "userGroup": { "user1": { "groupA": true, "groupB": true }, "user2": { "groupB": true } } I already try DatabaseReference userGroupRef = rootRef.child("userGroup/user2") but cannot show the name of the groups But if I use DatabaseReference groupsRef = rootRef.child("groups")

Firebase iOS - Type 'LoginViewController' does not conform to protocol 'FUIAuthDelegate'

寵の児 提交于 2019-12-08 04:14:17
问题 I'm in the process of integrating the Firebase Auth UI to my app, and for some reason I keep getting this error: Type 'LoginViewController' does not conform to protocol 'FUIAuthDelegate' Before you start downvoting me into oblivion, I promise that I'm not an idiot. The FUIAuthDelegate only has one required function, which is listed farther down in the issue inspector: Protocol requires function 'authUI(_:didSignInWith:error:)' with type '(FUIAuth, User?, Error?) -> Void'; do you want to add a

java.util.zip.ZipException: duplicate entry: com/google/firebase/iid/zzb.class

旧街凉风 提交于 2019-12-08 03:58:06
问题 I am using firebase, but can't generate signed APK. I have searched similar problems but solutions don't work for me. Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/firebase/iid/zzb.class My Gradle.build app file apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com

Android Firebase - Denormalized Queries using FirebaseUI

寵の児 提交于 2019-12-08 02:43:42
问题 I understand from the Structuring Data section in the documentation that denormalizing data is useful to achieve more efficient look ups when you have two way relationships. In my app, I have a denormalized data structure for chats and users : { users: { user1: { name: "user1", chats: { chat1: true, chat3: true, } } user2: { name: "user2", chats: { chat2: true, chat3: true, } } chats: { chat1: { chatID: "chat1", chats: { user1: true, } } chat3: { chatID: "chat3" , users: { user1: true, user2:

Android FirebaseRecyclerAdapter populateViewHolder() never get called

允我心安 提交于 2019-12-07 15:17:17
问题 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

Firebase RecyclerView Not Loading New Data

谁说胖子不能爱 提交于 2019-12-07 13:17:20
问题 I am trying to create a real-time RecyclerView every time a user adds an item to a certain Database reference in Firebase. Here is my model class: @IgnoreExtraProperties public class Poll { private String question; private String image_URL; public Poll() { } public Poll(String Question, String Image_URL){ this.question = Question; this.image_URL = Image_URL; } public String getQuestion() { return question; } public void setQuestion(String question) { question = question; } public String

How to initialize a Listview inside a fragment of Tab view android?

北战南征 提交于 2019-12-07 07:41:27
I have an activity which has three tabs. One fragment for each tabs. In the xml of the fragment layout I have a listview. I need to initialize this list view and populate it with data from the firebase. How can I do that? My activity code is public class AccountActivity extends AppCompatActivity { private SectionsPagerAdapter mSectionsPagerAdapter; private ViewPager mViewPager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_account); mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager())

DataSnapshot is missing a constructor with no arguments

三世轮回 提交于 2019-12-06 13:15:18
问题 I am implementing Firebase Recyclerview UI in my application. I have implemented a recyclerview adapter and it shows me following exception. Following is my adapter code : FirebaseRecyclerAdapter<DataSnapshot, MyHolder> recyclerAdapter = new FirebaseRecyclerAdapter<DataSnapshot, MyHolder>( DataSnapshot.class, R.layout.row_slots, MyHolder.class, databaseReference.child("slots").child(uid).child(dayOfWeek).child("time") ) { @Override protected void populateViewHolder(MyHolder viewHolder,

Open FirebaseUI-Android with Android Studio

爱⌒轻易说出口 提交于 2019-12-06 09:50:30
When I try to open FirebaseUI-Android with Android Studio nothing happens. I use Android studio 3.1.3. I want to see demos there. https://github.com/firebase/FirebaseUI-Android.git I have tried to open app project but nothing happens. All views show a message that said "Nothing to show". Someone have opened this project with android studio? Thanks. I did: Download latest version of gradle from https://gradle.org/ Open Android project and choose only app folder Select my gradle folder when assistant asked me Put google-services.json on the app project Now it is working. 来源: https:/

FirebaseIndexRecyclerAdapter onDataChanged is called but getItemCount() always return 0

梦想与她 提交于 2019-12-06 09:43:45
I'm using FirebaseIndexRecyclerAdapter which gets a keyRef and dataRef and is very helpful with getting all dataRef's children which their keys exists as children in keyRef. The data is being displayed correctly but if i'm overriding onDataChanged for hiding a progress bar and/or displaying an empty state depends on the itemsCount (Something which i've already done with FirebaseRecyclerAdapter and works as expected) but getItemCount always return 0(!) private class MYAdapter extends FirebaseIndexRecyclerAdapter<Item, ItemHolder> { . . @Override protected void onDataChanged() { super