All Questions
Tagged with google-cloud-firestore java
2,323 questions
1
vote
0
answers
54
views
Firestore only updates when accessed through a specific Android activity
I'm working on an Android app where users can add and remove restaurants from their favourites via the RestaurantPage activity. When I access the RestaurantPage activity from the UserFavourites ...
0
votes
1
answer
249
views
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception with firestore
I have a simple Micronaut application with controller as below
import com.google.api.core.ApiFuture;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.firestore.*;
import io....
0
votes
0
answers
43
views
How to Open An Activity other than Launcher Activity in Android when we click on Notification
I am using FCM Notifications in my app and I want to Open an Activity named ManageSalesMainActivity which is Not a Launcher Activity and want to pass string using pending intent.
It is working fine ...
0
votes
1
answer
56
views
Firestore has trouble initialize db in Docker
I'm making a Java application which will connect to a Firestore db on GCP to do some data read and write, it all worked well if I build and run with mvn, but when I build it into a Docker container, ...
0
votes
1
answer
133
views
run firebase emulator in spring boot test
I need to migrate some documents from one collection to another. This migration runs when the application starts up. It checks if the migration is finished, if it's not, it will run it otherwise it ...
0
votes
1
answer
57
views
Clear Firestore database after testing
I am running Android UI tests. I use a separate Firestore DB for testing. I want to delete all documents after a test finishes. This curl command works.
curl -v -X DELETE "http://127.0.0.1:8080/...
0
votes
1
answer
49
views
Synchronise two event listeners / Using nested queries for firestore
I need to fill a RecyclerView with the trip data. This means I need to retrieve data from two different collections from my Firestore database.
collection 1: "users" which contains all data ...
1
vote
1
answer
64
views
Why is Firestore not mapping a field of type private?
I have the following structure in Firestore:
The map called lecturaBreve corresponds to the following class:
public class BiblicalShort extends Biblical {
private LHResponsoryShort responsorio;
...
1
vote
1
answer
108
views
No data from Firestore displayed in the recycler view
I started with Firestore and I created a collection MealsDev containing one element.
I cannot display it in a recycler view. May you help with it?
In the meantime I have already checked other posts, ...
0
votes
1
answer
208
views
I can write to my Firebase Firestore database, but am unable to read from it (Android Studio using Java)
I am trying to connect my Android app to my Firestore database. I can write to my database from my app, but I am unable to read from it.
AndroidManifest:
<?xml version="1.0" encoding=&...
0
votes
1
answer
48
views
My android app doesn't recognize my adapter. No adapter attached skipping layout
I'm making a journal app and whenever I try to use the menu on the toolbar, it says:
o adapter attached skipping layout
A> nd doesn't allow me to add another journal to my journal list
(...
1
vote
0
answers
37
views
Android application doesn't save data on firebase firestore console site
I tried putting firestore using the option in Android Studio which is in "Tools" and I also tried putting it directly (putting the dependencies and everything else). Also I connected my ...
0
votes
1
answer
36
views
Trying to retrieve data from a document in Firestore but it returns null when mapping to a Java object
Here is the code for the LessonGroup class:
public class LessonGroup implements Serializable {
//properties
private String studentId;
private String lessonGroupId;
private String ...
0
votes
1
answer
43
views
Firestore auto-remove "is" in property name? [duplicate]
I'm using Firestore for my project, and I've noticed that for some reason, the data stored in my db has the "is" removed from the key.
Here is my model in Kotlin:
@Serializable
data class ...
0
votes
1
answer
31
views
Firestore API states index does not exist when it does
I'm using the Java Firestore library to access my Firestore database. I am making this Query:
Query chatQuery = firestore.collection("chats")
.whereEqualTo("userId", userId)
....
0
votes
1
answer
62
views
Firestore Write from Beam
Is it possible to write to 2 different firestore databases from the same beam Job ? One database is the 'default' and the other being a different one.
When building the beam pipeline, it is picking ...
0
votes
1
answer
88
views
Firebase OnSuccessListener times out when I try to wait for it to finish
I'm trying to load data from my Firebase Firestore database. This code uses an OnSuccessListener which runs async so I'm trying to wait till it loads data to continue. I have done this by creating a ...
1
vote
2
answers
260
views
Import firestore DocumentEventData type in Java project
I'm trying to follow this tutorial.
I want to be able to write Cloud Function event triggers in my Visual Studio code Java 17 Runtime project. In the above link, there is a snippet I'm trying to copy. ...
1
vote
0
answers
106
views
Data is not saved to database. Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}
My problem is about implementation of Firebase in android app. I have followed all steps told in the tutorials but I still cannot figure out why data is not saved to the firestore. I am aware of the ...
1
vote
2
answers
38
views
Handle huge number of index in Firestore queries
Here is my code:
Query query = firestore.collection("users")
.document(myUserID)
.collection("unseen_profiles")
.whereEqualTo("country", ...
0
votes
1
answer
54
views
Trying to fetch all the Data of a collection but keep getting "No Setter For Fields"
I'm facing an issue with mapping data from Firestore to Java objects in my Spring Boot application. Specifically, when retrieving data from Firestore and mapping it to my Java class, most fields are ...
1
vote
2
answers
60
views
why does the wrong toast message keep appearing?
I have a class called BookRoomActivity:
public class BookRoomActivity extends AppCompatActivity {
String staffPromotionCode;
EditText etRoomName,etprice,etDate,etCapacity,etPromotion;
...
0
votes
0
answers
46
views
Android: The app doesn't upload file to firebase
I have a problem. Android application upload the audio file to firebase, but the application doesn't upload the content.
I have these codes:
UploadSong (this code the controller of the input:
public ...
0
votes
1
answer
24
views
how to set properly a setOnClickListener on my adapter Firestore Recyclerview
I need to set a setonclick listener in my adapter for my RecyclerView(firestore), my activity to be show on the click is RestaurantDetails, i need to click on the restaurant cards and be directed to a ...
1
vote
1
answer
69
views
How to map Firestore document presented in json-specific format (Firestore data model) to java class?
I obtain JSON from PubSub message. JSON represents a document from Firestore (a specific Firestore data model with additional intermediate objects that define the type of field).
I need to map this ...
0
votes
1
answer
26
views
I made a logic which collects data from firestore documents of all clients and generates different pdf for each clients but it only generates one pdf
The loop is expected to iterate for the total number of clients but exits after generating a pdf for one client:
private void generatePdf() {
firestore.collection("Users").document(...
0
votes
1
answer
46
views
How can i update my status field in firestore after several time
I am creating an app to book parking in different locations in that when Admin accepts a user parking request I have set that particular Location's slot status as true. But I want to reset that Status ...
0
votes
1
answer
49
views
in Firestore, what happens if i try to update an existing document's field when the field doesn't exist?
Let's say I have a collection in Firestore. this collection has some documents, but not all documents have the same fields. for example, one document with ID "house" might have the fields &...
0
votes
1
answer
67
views
How to identify Firebase Firestore errors and exceptions in Android
public static void getMember(String id, DataListener<Member> listener){
FirebaseAgent.getMemberDocumentReference(id).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot&...
0
votes
1
answer
72
views
ClassCastException when trying to get the timestamp from firestore with springboot
I'm trying to get the timestamp from a document in a collection but I get an error:
ERROR 26920 --- java.lang.ClassCastException: class java.util.Date cannot be cast to class com.google.cloud....
0
votes
1
answer
36
views
Returning and receiving map in callable Firebase functions
is there a way to return a map from a firebase callable function to client using Android - Java? Basically just create a map inside a firebase function (using .js) and return it to the client android ...
0
votes
1
answer
32
views
Unable to write to Firebase Firestore
Unable to get the save button (which is the tick button) to save the entry to Firebase Firestore. It always returns a failed command when pressed. It showed me a "Failed while adding detail" ...
2
votes
0
answers
269
views
Failed resolutions of credentialsbuilder
I want to continue an old android project of mine and started fixing issues with that. My program launches well in android virtual device but then goes background.(I tried it on my phone it doesn't do ...
0
votes
0
answers
19
views
Attempt to invoke virtual method 'java.lang.Long com.google.firebase.firestore.QueryDocumentSnapshot.getLong(java.lang.String)' on a null object [duplicate]
I am trying to get the data from firestore database but i getting the error when i define that the value is not null but error is not remove my code
public static void LoadBook(MyCompleteListener ...
-2
votes
1
answer
216
views
java.lang.NullPointerException: Attempt to invoke virtual method to call the data from firebase
I am trying to get the database collection from Firestore but getting two errors first warning is:
Do not place Android context classes in static fields
Second, when I call the database, it shows:
...
0
votes
2
answers
43
views
Firestore document returns null values for fields only when the app is downloaded from Google Play; not a problem when loaded via Android Studio
My app is currently available only on the Internal test track. It runs without error when launched from Android Studio, but when I upload it to Google Play, delete it from my phone and then download ...
2
votes
0
answers
53
views
Can't delete document on firestore in Android Studio
Everyone I am a new learner of Android Studio, and on our school project, we have three tabs 'album', 'notes', and 'files' and I am getting errors when deleting a document from their subcollection.
...
0
votes
1
answer
54
views
onCreateViewHolder of FirestorePagingAdapter not overriding
im giving maintenance on a code that broke recently, its trying to retrieve data from firebase using FirestorePagingAdapter, it say that the function onCreateViewHolder does not override a method from ...
0
votes
1
answer
69
views
Cloud Firestore not returning all documents requested
I'm using Cloud Firestore to store several thousand documents each containing a field called "Best score". For most of the documents, "Best score" is a String but a number of them ...
1
vote
0
answers
50
views
Delete data from Firebase
private void deleteItem(int position) {
String itemId = aniPostArrayList.get(position).aniId;
// Reference to the document in Firestore
DocumentReference documentReference = ...
0
votes
0
answers
24
views
The application don't return the correct answer once I choose a button that contains the choices for a question
private void checkAnswer(String selectChoice, View view) {
Button selectedButton = (Button) view;
Question currentQuestion = questionList.get(questionNum);
if (selectChoice.trim()....
0
votes
1
answer
88
views
Can’t collect data from Firestore into Android [duplicate]
I successfully sent data to Firestore (collection:Food), but I couldn't collect data from Firestore (collection:Food). I even added try/catch and set breakpoints, but I couldn't gain more information ...
0
votes
1
answer
307
views
Kotlin multiple setters/getters (generics)
I am using Firestore as my Android app database, and while trying to save data to Firestore, it still saves my 'details' field, even though annotated with @Exclude.
Problem occurs because Kotlin ...
0
votes
0
answers
36
views
Instead of turning to green once I pick the correct button, all the buttons just turns to red once clicked
I'm having a problem with the application I'm making for our final project. All the functionalities I need is working fine except for the buttons.
Once I click the button with the correct answer, ...
2
votes
1
answer
72
views
How to retrieve data from sub-collections with Firebase firestore to Viewpager in Java, Android?
I'm working on a Java Android project. My goal is to make an application that gives the user information about countries. Whichever country the user chooses, the country and information about that ...
-1
votes
2
answers
554
views
Firebase Unhandle Exception PlatformException(null-error, Host platform returned null value for non-null return value., null, null)
When I was make application for user signup and signin by using firebase but I cannot run as properly it give some error like bellow.
E/flutter ( 6840): #0 FirebaseCoreHostApi.optionsFromResource ...
0
votes
0
answers
139
views
How can I listen to MDC search bar typed-in String, in order to display results onto SearchView UI?
I've tried to connect the Material Design Component Search Bar component into my Android Studio, but I have difficulties doing so.
Firstly, I'm not sure whether searchView.getEditText()....
0
votes
1
answer
362
views
Reading data from Firestore. Resolving the ApiFuture import
I want to read from a Firestore database in a Java application. I am following the guide here: https://firebase.google.com/docs/firestore/quickstart#read_data.
In order to read documents, I need to ...
0
votes
1
answer
1k
views
Choose which Firestore database to connect
I have two Firestore databases in my google cloud "default" and "mydb". When I set up my spring boot app to connect to the database it always connect to the "default" one....
1
vote
0
answers
272
views
Fatal Exception: com.google.android.gms.tasks.RuntimeExecutionException: com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED
PERMISSION_DENIED: Missing or insufficient permissions.
com.google.firebase.firestore.FirebaseFirestoreException
I have several android apps on google playstore that use Firestore as the backend. All ...