firebase-realtime-database

Save and retrieve data from firebase database Android

Deadly 提交于 2021-02-11 12:50:32
问题 I'm working on a project where I have to do a custom "tour/trip" based on the locations the user chooses on the map. and every tour has a title, with the locations that he chose. say for example he made a tour(list) and called it 'Tour 1' and in this 'Tour 1' first he wants to go to the hotel, and then to KFC, and then to the beach. I'm at the point where I made a list and gave it a title, but can't show the places that I planned to go in the activity, here is a screenshot of the activity

Save and retrieve data from firebase database Android

痞子三分冷 提交于 2021-02-11 12:50:02
问题 I'm working on a project where I have to do a custom "tour/trip" based on the locations the user chooses on the map. and every tour has a title, with the locations that he chose. say for example he made a tour(list) and called it 'Tour 1' and in this 'Tour 1' first he wants to go to the hotel, and then to KFC, and then to the beach. I'm at the point where I made a list and gave it a title, but can't show the places that I planned to go in the activity, here is a screenshot of the activity

Android: Firebase realtime database updated when app destroyed

不羁的心 提交于 2021-02-11 12:49:04
问题 I'm new to firebase realtime database, and have a basic question I cannot seem to find the answer to. I need my Android app to keep track of changes in the database, so I understand I need to use addValueEventListener, with the onDataChange method. However will the method onDataChange, be called even if the app is destroyed? I need to be able to access the changes of the information in the database even if the app isn't running in the background, (for example the user force quits the app).

Firebase Database - Sending payload with REST request

雨燕双飞 提交于 2021-02-11 12:41:08
问题 Is is possible to include a payload/parameter when executing a GET request to Firebase Realtime Database, in order to access the payload/parameter in the Firebase Realtime Database rules? Using React Native with Javascript. 回答1: For a GET/read request to the Realtime Database, the following information is available in your security rules: The path that is requested, or the query that was executed. The auth variable indicating the logged in user, including any claims in auth.token. So if you

Add Custom user Property through firebase function

柔情痞子 提交于 2021-02-11 12:33:14
问题 Currently in our realtime database, we have a planDetails node for each uid that has fields like startDate , endDate , planType . I want to track the number of users whose premium plan is active. I am trying to do this by making a firebase function that runs daily and updates a boolean custom user property, say isPremiumActive , to either true or false. I cannot just track the users who have purchased the premium plan because there are many who take the plan once and then don't renew it.

Can't pass null for argument 'pathString' in child()? This the error I'm getting when retrieving data from firebase

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 12:28:20
问题 I'm creating an app with firebase as a backend, First I got output but after few changes I did for intent then it shows like this, Can anyone help me to solve this error. I used if to check whether I'm getting data or not and It goes through that if condition still it shows null. Activity 1: public class centerActivity extends AppCompatActivity { RecyclerView recyclerView; ArrayList<data> mArrayList; FrontlistAdapter mAdapter; FirebaseRecyclerOptions<data> options; FirebaseDatabase database =

Why am I getting “undefined” when I try to retrieve this array of objects from firebase?

旧城冷巷雨未停 提交于 2021-02-11 12:19:05
问题 I'm building this exercise which involves the user filling out a form, and the info from the form is pushed into a firebase database and it produces a card which contains the info. There are basically three functions: addBookToLibrary() which takes the info from the form after the user hits the submit button and puts it into firebase, render() which draws the card with the info on it, and Book which creates the object from the data entered into the form. I decided to add retrievefromDatabase(

How to send notification to multiple device token using firebase cloud functions

筅森魡賤 提交于 2021-02-11 12:11:51
问题 I am new in using Firebase Cloud Functions and JavaScript and I was able to send notification to a single device using Firebase Cloud Functions(JavaScript). Now I am trying to send push notification to multiple device token and I think I have a problem on it. I want to send the notification to these device tokens in my firebase database: /receivers /event1 /uid1: device_token1 /uid2: device_token2 /uid3: device_token3 /uid4: device_token4 This is my code so far but it doesn't work.. exports

How to send notification to multiple device token using firebase cloud functions

烂漫一生 提交于 2021-02-11 12:10:12
问题 I am new in using Firebase Cloud Functions and JavaScript and I was able to send notification to a single device using Firebase Cloud Functions(JavaScript). Now I am trying to send push notification to multiple device token and I think I have a problem on it. I want to send the notification to these device tokens in my firebase database: /receivers /event1 /uid1: device_token1 /uid2: device_token2 /uid3: device_token3 /uid4: device_token4 This is my code so far but it doesn't work.. exports

In firebase by using email and password authentication, i want to additional user data using push

耗尽温柔 提交于 2021-02-11 09:58:55
问题 I am using firebase as my backend. Users are authenticating using Email and Password. I'm storing additional data such as name and phone in the realtime database using push. How do i retrieve user data to display on the user profile since a uniqueid is generated. Here is the activity in which i'm storing the data public class UserActivity extends AppCompatActivity { private EditText inputName, inputPhone, inputNatId,inputDOB; private TextInputLayout inputLayoutName, inputLayoutPhone,