here is the link to the app i’m working in
I am creating a to-do app based in the cloud for couples to help each other remeber to do things! but having a hard time doing things the right way. I’m not sure if im storing the list incorrectly.
I am able to brute force get my list to populate, but it’s ugly and doesnt work well. This code
is not populating anything from my list.
can anyone tell me what i’m doing wrong here or send me towards a tutorial that would help me understand whats wrong here?
When I save the list, do I use a pink creat object block??
this is how i accomlish this task in a very ugly and not always working manner.
Thank you @darren, for your Firebase tutorial series and @actech for all of the firebase support you have provided on the forum. I was reluctant to watch these, ( admittedly, I’m a know it all and it’s a huge character flaw at times), thinking I could figure it out on my own.
The way you explain turning the JSON into a list made a lot of sense. I thought it would be as easy as putting it into a loop and pulling the properties “…” of object j, but no!
I have created this as a cloud-based ‘to do list’ in which ideally 2 people can sign in using the same info (for now, i want to change this in the future), and share a todo list. Think about teams at work, (or in my case husband/wife). When one person completes a task, it would update for both people automatically. it is simple but serves my purposes.
all feedback is welcomed and appreciated.
here is the code and working but not finished app which uses firebase and lists of data
Still I wonder, is there a better way to accomplish this?
Hi there, sSorry for jumping into a solved topic. However, I just watched @darren 's awesome tutorial on how to use Firebase Realtime DB and also checked out @jared 's sample app from this example.
The one thing I’m still not getting is how you are getting the user id? At which point in the app are you initialising the variable and how? In the tutorial, it’s just there.
My thought was to literally just drag and drop the “userid” field from the firebase signin. I tried doing this on the signin screen itself and on the screen the user lands on after having logged in successfully:
Here are my blocks for saving data in the DB:
And this is what turns up in the database, which does not contain the user id. I feel like I’m getting something wrong here.
Side note: I see the registered users and their IDs in the authentication list.
A hint would be greatly appreciated. I just can’t seem to figure it ou.
This will come from the sign in component. Check out the real-time login “call sign in” block. There is a green block that says user id. Create an app variable and set the variable to the green userID block after a sign in.
What I was missing that I not only need to initialise the variable but also actually set it.
Now it works like a charm
Jared to the rescue!
I did notice an issue now which again I can’t seem to figure out.
I am using the function to remember the user and log them in automatically when returning to the app.
However, in this case the user ID doesn’t seem to get set even though I actually believe I am doing the exact same thing as when the user signs in without stored credentials.
This is what arrives in the database with the last entry being from the returning user (no user ID) and the first 2 entries being from users who did not use the “remember login details” function (with user ID):
When a user logs in and sets the “remember my login details” switch to true, then continues into the app and sends data to the DB during the same session, their user ID gets sent along correctly. Only when the same user returns to the app at a later time and gets logged in based on their stored credentials, their user ID does not get sent along any more.
Looking at my auto-signin on the right hand side, I don’t know why this shouldn’t work though.
The following are my blocks.