firebase

How to list files and folders in Firebase Storage

£可爱£侵袭症+ 提交于 2021-02-11 14:42:14
问题 I am working on a school project and have elected to use Firebase as a storage option for uploading/downloading files via an app that I am developing. I would like to be able to display to the user a list of all the files within a specific folder, and also give that user the ability to upload files. However, it seems that the only way to access information within the firebase storage, is to, as the developer, know what the file is rather than find files and display them dynamically. I hope I

Filtering and loading data, compared value in firebase android

北城余情 提交于 2021-02-11 14:41:32
问题 I want to display ListTesting data sorted by projectName from the current user . I try this but it does not work (data not showing): public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_list_testing, container, false); if (getActivity() != null) Objects.requireNonNull(((AppCompatActivity) getActivity()).getSupportActionBar()).hide(); firebaseAuth = FirebaseAuth.getInstance();

Firebase: update an integer value

心已入冬 提交于 2021-02-11 14:38:36
问题 So im coding an inventory management app and I'm using a barcode scanner to scan my products. My idea is that every time that a product gets scanned I need to remove one quantity of it on my database. Like this: Scan product-->quantity=quantity-1 And this is my code @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mFirestore = FirebaseFirestore.getInstance(); scannerView = new ZXingScannerView(this); setContentView(scannerView); private void

Firebase Security Rules for domain specific [duplicate]

女生的网名这么多〃 提交于 2021-02-11 14:36:51
问题 This question already has answers here : Firebase Security Rules Storage from specific web url (2 answers) Closed 5 months ago . I am building the application which uses the Fiberbase Storage, I do not want the user to log in or signup, just allow them to upload files through my website only. I don't want others to copy the Firebase config key and use in their website to upload a file on my firebase account, so I want to set up some rules which will restrict access over the certain domain 回答1

Firebase Security Rules for domain specific [duplicate]

泄露秘密 提交于 2021-02-11 14:35:30
问题 This question already has answers here : Firebase Security Rules Storage from specific web url (2 answers) Closed 5 months ago . I am building the application which uses the Fiberbase Storage, I do not want the user to log in or signup, just allow them to upload files through my website only. I don't want others to copy the Firebase config key and use in their website to upload a file on my firebase account, so I want to set up some rules which will restrict access over the certain domain 回答1

How do I handle my data model class to get Firebase Firestore data into recyclerView?

寵の児 提交于 2021-02-11 14:34:05
问题 I have a Firestore database like this: I want to access each of the different symptom data's i.e. "Anxiety_data" and its children which consists of timestamps, and then a dictionary, and place them into a RecyclerView using FirebaseUI FirebaseRecyclerViewAdapter I have this model class: public class EntryDataModel { private String timestamp, symptom, severity, comment; public EntryDataModel() {} public EntryDataModel(String timestamp, String symptom, String severity, String comment) { this

Firebase functions user().onCreate: Pass parameters [duplicate]

≯℡__Kan透↙ 提交于 2021-02-11 14:27:44
问题 This question already has answers here : Should firebase auth onCreate trigger have more data? (1 answer) Firebase Auth+Functions | create user with displayName (1 answer) Closed 8 months ago . I have 2 types of users, admins and normal users. In my firebase database, each admin has a document in a 'texts' collection. So, when a new user is created, I want to check if it is an admin or not. On my Flutter client however, I cant pass any other param than email and password, so how does my

I cannot retrieve nested child from firebase through pojo class object

不打扰是莪最后的温柔 提交于 2021-02-11 14:23:29
问题 This is my database table: I am saving some user information in Firebase through POJO class during installation i.e. name, photo, phone number. Later on in app user can add trusted contact I am adding it creating a nested child in same user table using POJO class. My question is how to get this trustedcontact value from firebase i.e. contactname1, contactnumber1? This is my POJO class: package com.example.fizatanveerkhan.citycops; import java.util.HashMap; public class UserInformation {

same Firestore realtime database for client and user

妖精的绣舞 提交于 2021-02-11 14:23:13
问题 I want to make a Flutter app for showing shop details. I stored data in the Firestore real-time database. It's working perfectly. What I want to do now is make another app for the owner, then he can change data in Firestore and also send push notifications to shop app users. Is this possible? It would be helpful If you have any tutorials or videos.I haven't tried cloud functions because they need a credit card, Which I don't have. 来源: https://stackoverflow.com/questions/65352286/same

Firestore query single document

给你一囗甜甜゛ 提交于 2021-02-11 14:22:43
问题 In a flutter app, I need to pull the users document from firestore only if the last updated field is greater then the last updated locally. Currently this is what I do: QuerySnapshot usersData = await Firestore.instance .collection("users") .where("lastUpdated", isGreaterThan: lastUpdatedLocally) .where("userId", isEqualTo: userId) .getDocuments(); Map<String, dynamic> userData = usersData.documents.isEmpty ? {} : usersData.documents.first.data; I have three questions: Is it possible to do