Posts

Showing posts with the label google-cloud-firestore

Firestore & Swift

Firestore & Swift Currently I'm working on a project which uses Firestore. The problem I am facing is as follows: I want to fill a collectionview with data from Firestore, the data is an image + a label. Once a user clicks on the item (image + label) in the collectionview they go to that categorie. So once they click they will get a new collectionview with the items of that categorie (also just an image + label). Now my question is how do I do this? Cause I can't seem to find related study material for my problem. I have been looking all over Google, YouTube and what not. Most of the tutorials or guides I find are for Firebase Realtime Database (so not Firestore) or are just flat out outdated (pre 2017). Also I wonder what the best practices are, do I make a struct for my categories and items? Looking for all round tips here or good reading material so I can learn how to do this. Thanks in advance. This is way too broad a topic for an answer, an...

Flutter: StreamBuilder uses old stream instead of new stream

Flutter: StreamBuilder uses old stream instead of new stream I'm trying to show a Google-Firestore real-time list on my Flutter app using Flutter's StreamBuilder. However, the stream seems to be using both the old data and the new data, instead of just the new one. (See below) //This is the widget with the stream Expanded( child: StreamBuilder<QuerySnapshot>( stream: _firestoreInstance.collection("seeks").document('145725').collection("classes").document(_chosenClass) .collection("classTopics").document(date).collection("dateTopics").snapshots(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot){ if (!snapshot.hasData) return Text('Loading...'); return ListView( children: snapshot.data.documents.map((DocumentSnapshot document){ debugPrint("DOCCUMENT ID: ${document.documentID} AND topic...

Error: In adding Firebase Storage dependency to Android Studio Project?

Image
Error: In adding Firebase Storage dependency to Android Studio Project? I have created a Firestore Project in Android Studio. In which I have Firebase Authorization implemented and that is working absolutely fine. I am able to push documents to Firestore Database. But now, I am trying to add functionality using which I can store media/images to Firebase Storage but when I am adding this dependency to app's build.gradle file, I am getting this error: Dependency added: implementation 'com.google.firebase:firebase-storage:16.0.1' This is the error that I am getting: Could not find firebase-common.jar (com.google.firebase:firebase-common:16.0.0). Searched in the following locations:https://jcenter.bintray.com/com/google/firebase/firebase-common/16.0.0/firebase-common-16.0.0.jar FYI, In my project I already have this kind of configuration: classpath 'com.android.tools.build:gradle:3.1.3' And apply plugin: 'com.google.gms.google-services' I can not find what is go...

Firebase Hosting for a client in Denmark by a group of developers in India

Image
Firebase Hosting for a client in Denmark by a group of developers in India I am working on an application for a client in Denmark, using the firebase Hosting, Firestore and Cloud functions from among the features of firebase. While creating a project on the console i selected the location as Denmark as well, so my doubt here is once i Deploy the app to my client's system where will the server be location, will all the features work as expected. If not what configurations are required? 1 Answer 1 First of all, you need to read this carefully. Even if you selected Denmark, it does not determine the location of your data for Firebase features. I recommend you to take a look at this link for Firestore region. In the case of Cloud Function region, it is helpful to look at this link and this link. By clicking "Post Your Answer", you acknowledge tha...

Firestore query subcollections

Firestore query subcollections I thought I read that you can query subcollections with the new Firebase Firestore, but I don't see any examples. For example I have my Firestore setup in the following way: How would I be able to query "Find all dances where songName == 'X'" 6 Answers 6 This is a feature which does not yet exist. It's called a "collection group query" and would allow you query all songs regardless of which dance contained them. This is something we intend to support but don't have a concrete timeline on when it's coming. The alternative structure at this point is to make songs a top-level collection and make which dance the song is a part of a property of the song. It would be MUCH better if the Firestore dev team implemented subcollection queries ASAP. After all, 'more powerful queries' is one of the majo...