Getting Started with Firebase Realtime Database and Xamarin.Forms

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • With Firebase Realtime Database you have a very powerful DocumentDB at your service. In this video we will see how to insert data into a database and have it show up on another Xamarin.Forms app in realtime!
    💝 Join this channel to get access to perks:
    th-cam.com/channels/ral.html...
    🛑 Don't forget to subscribe to my channel for more cool content: th-cam.com/users/GeraldVerslui...
    🐦 Follow me on Twitter: / jfversluis
    🤝 Join the Discord server: / discord
    🔗 Links
    Sample code repo: github.com/jfversluis/XFFireb...
    Plugin Repository: github.com/step-up-labs/fireb...
    Firebase Database Documentation: firebase.google.com/docs/data...
    ⏱ Timestamps
    00:00 - Intro
    00:13 - What We Will Learn in This Video
    00:43 - Create Firebase Project
    05:20 - Sample Apps Structure
    07:12 - Install FirebaseDatabase.net Plugin
    07:53 - Implement Firebase Real-Time Database
    09:15 - Saving Data
    10:37 - Retrieve Data Real-Time
    14:49 - Running Sample Apps
    16:06 - Outro
    🎥 Video edited with Camtasia (ref): techsmith.z6rjha.net/AJoeD
    🙋‍♂️ Also find my...
    Blog: blog.verslu.is
    Twitch: / jfversluis
    All the rest: jfversluis.dev
    #xamarinforms #firebase #realtimedatabase #database #crud
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 102

  • @SkyPoly
    @SkyPoly 2 ปีที่แล้ว +1

    Thank you so much I am able now to control my Xamarin app with wpf

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      That sounds amazing!

  • @RonalPortes
    @RonalPortes 2 ปีที่แล้ว +4

    Hi, thank you for sharing all this tips with the cummunity. Can you please do a video on firebase authentication?

  • @sifar1857
    @sifar1857 2 ปีที่แล้ว +2

    This is pretty exciting because this is gonna enable things like live chatting, live location sharing, etc. 👍🏼

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Exactly! You can do amazing things with this!

  • @truedaystar
    @truedaystar 5 หลายเดือนก่อน

    This is kinda exciting... Couple location based apps I want to make along with some data included. Your other videos are great too. Thanks for sharing.

    • @jfversluis
      @jfversluis  5 หลายเดือนก่อน

      Good luck!

  • @machtal1980
    @machtal1980 2 ปีที่แล้ว +1

    wow!! another firebase video, thank you. Did you gonna do Firebase In-App Messaging implementation in Xamarin? Because it's hard to find this topic :(

  • @anandshindey
    @anandshindey 2 ปีที่แล้ว

    Just what i needed. James en Gerald, dank je.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Great! Thanks Anand!

  • @sal96ali
    @sal96ali ปีที่แล้ว

    Thanks,
    I noticed that the real time updating is working for a while when I open the app, then it freazes and does not update data automatically, so I wrap the stack layout within RefreshView.
    I dont want to tweak the code I want the data to be updated automatically.

  • @user-od5lm1ne4y
    @user-od5lm1ne4y ปีที่แล้ว

    Thank you a lot. Now, i am building an app with net maui with firebase realtime db, it works well, but i can't disconnect the app from firebase, Dispose() method works, i am not getting new messages from firebase, but in the firebase console, usage tab, i see that my app is not disconnected

  • @rickshadle3753
    @rickshadle3753 8 หลายเดือนก่อน

    Thanks for posting this video. I attempted to execute your code with my own Firebase DB but when posting a text message via the Entry on the XFFirebaseRealtimeDBSample project, post appears to be successful but when I view my Firebase DB there is no data. I received no errors. What I did was break the projects up into separate ones and get the same results. The client code throws an error. I must be doing something wrong but not sure what it is. I used your code verbatim but error city.

  • @elijahromer6544
    @elijahromer6544 4 หลายเดือนก่อน

    Awesome, thanks Gerald. Would you please make a video like this for integrating Firebase Firestore with .NET MAUI targeting .NET 7 by chance?

  • @MarcAmposta
    @MarcAmposta 2 ปีที่แล้ว

    Thanks a lot Gerard. Super helpful as always. I think is harder to get working firestore. Maybe is not. It would be awesome if you could cover it

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      I’ll look into it!

  • @michael_azzer
    @michael_azzer 2 ปีที่แล้ว

    that's amazing 👌

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Thanks a lot 😊

  • @motorparadise
    @motorparadise 2 ปีที่แล้ว +7

    We need more firebase and xamarin.forms videos along with some firebase server-side restrictions and coding.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Will see what I can do about that

    • @MihaiMoisei
      @MihaiMoisei 2 ปีที่แล้ว +1

      See th-cam.com/video/AVoPYLwSfHc/w-d-xo.html

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      @@MihaiMoisei thanks for sharing Mihai!

    • @craigmadsen4307
      @craigmadsen4307 2 ปีที่แล้ว

      When do you plan on doing one of these with .Net Maui? I'm looking for a training video where you logon to something like Firebase or AirTable and get a person's ID (assuming ID & Password are valid), then proceed to find rows with that ID in some other Firebase or AirTable tables. Go, Gerald!!

  • @robinthereviewer6019
    @robinthereviewer6019 2 ปีที่แล้ว

    I love your videos, so helpful to me a newbie Xamarin Forms / Firebase developer. Is there a simple way to get the data once on page load if I want to display static data (from a Firebase collection) in a CollectionView, including an image URL? I don't think I need it to be observable.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      It needs to be observable if you want to update the data easily and efficiently at runtime. For getting the data just use what I show in the video without the subscribe, that will just get you the list :)

  • @Pevi70
    @Pevi70 6 หลายเดือนก่อน

    Hi Gerald, would you be interested in making an updated version of this in Maui?

  • @not_vdb0059
    @not_vdb0059 2 ปีที่แล้ว

    Hello Gerald do you have a tutorial on deleting data in the realtime db?

  • @TheLinkimos
    @TheLinkimos ปีที่แล้ว

    Hi Gerald,
    How can I send data to the database offline and retrieve data from the database offline?

  • @sal96ali
    @sal96ali 2 ปีที่แล้ว

    Thanks 👍👍👍👍
    How can use filter to AsObservable method,
    Or I want to update my View (which retrieve data from methodById(Id)) instantly..

  • @RokieTheJawa
    @RokieTheJawa 2 ปีที่แล้ว

    Do you have an example but using email and password credentials? Because every example I see on the internet are using no rules and that makes it insecure.

  • @YaSiRaRaFaTdoTNet
    @YaSiRaRaFaTdoTNet ปีที่แล้ว

    Great introduction and to-the-point information! I am totally new to MAUI and wondering if the same could be applied to MAUI as well.

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      If the plug-in can be installer on .NET MAUI it would work exactly the same :)

    • @lpe6300
      @lpe6300 ปีที่แล้ว

      @@jfversluis not working on .net maui

  • @AniketKumar-zv8ro
    @AniketKumar-zv8ro 2 ปีที่แล้ว

    Could you please make a video on firebase crashlytics? It would be really helpful. Thanks in advance

  • @pashaPDX
    @pashaPDX ปีที่แล้ว

    Great Video, Can you make a video on how to retrieve specific record from Firebase? Firebase is good to store objects, is it possible to create a query to select one object with specific text or id?

  • @teymurasadov295
    @teymurasadov295 2 ปีที่แล้ว +1

    Wow, for me it was a first introduction to Firebase Database, thanks 🙏
    But now I'm wondering, could it fully replace the backend api with storing data in azure sql or cosmos 🤔

    • @teymurasadov295
      @teymurasadov295 2 ปีที่แล้ว

      Or maybe the following scheme: mobile -> rest api -> firebase -> mobile. Sorry, just thinking out loud 😄

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Sure! It all depends on what to use and how you want to use it. People are definitely using this in production instead of relational databases. Also, CosmosDB can have DocumentDBs as well :)

  • @snooki9
    @snooki9 2 ปีที่แล้ว

    NIce, that's the kind of video that I was looking for (Discord question :p). The nice thing is coding, is when you reply to one question, you open 3 others xD Thanks Gerlald !

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Ooh perfect! Glad you found it 😄

  • @philippedoumet6073
    @philippedoumet6073 2 ปีที่แล้ว

    Thank you Gerald, gread video as always 😄. Do you plan on making a video on how to post an image to firebase?

  • @ahmadsalim1726
    @ahmadsalim1726 2 ปีที่แล้ว +2

    Do some authentication videos with firebase please

  • @christianzaragoza7575
    @christianzaragoza7575 ปีที่แล้ว

    Hola Gerald, excelente aporte, se podrá hacer lo mismo con Maui?

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Hola! Gracias! You should be able to do that. Not sure if this plugin was made compatible with .NET MAUI yet...

    • @christianzaragoza7575
      @christianzaragoza7575 ปีที่แล้ว

      @@jfversluis funciona para Maui, dejo este comentario por si es útil para alguien. Saludos.

  • @ahmedelborki5982
    @ahmedelborki5982 ปีที่แล้ว

    I have a question
    Do you have to configure each platform you develop with Google-service.json file ?
    The thing is when I used firebase, the response takes a long time to upload data
    Thanks
    Best regards

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Depends on what you want to do I think. You can definitely use the same json file, but in Xamarin.Forms those are separate projects so either put the file in each project or better maybe to use a symbolic link

  • @gelote8226
    @gelote8226 ปีที่แล้ว

    Hi Gerald. Nice video. THX!
    I'm looking for months for a simple version to hold an sqlite database (for offline use) in Xamarin.Form or MAUI for Android and Windows and synchronize it with a cloud.
    With your variant, I could get en put data from this Firebase Database and synchronize my local sqlite database, but it would be quite a lot of work to build this in firebase and as sqlite to get them both actual.
    Maybe you have an easier solution for that.
    The easiest way would be for me, to synchronise sqlite to a MSSQL-Database, but the prices are to high for me for that.
    Thank you in advance and keep coding 😉
    gelo

  • @renelok6847
    @renelok6847 2 ปีที่แล้ว

    Hi Gerald, Thanks for the great videos.
    I have a question.
    If a record is added to a CollectionView via Firebase.
    Then that item always comes at the bottom.
    Is there a way to get a new record in the top line?
    I've tried a lot but I can't figure this one out.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Thanks René! You can use the Insert method on your ItemsSource collection and set the Insert to 0 to add it to the top :)

    • @renelok6847
      @renelok6847 2 ปีที่แล้ว

      @@jfversluis
      Hi Gerald
      Thank you so much.
      DatabaseItems.Add(dbevent.Object);
      Become.
      DatabaseItems.Insert(0,dbevent.Object);
      Zo makkelijk kan het zijn.
      Als je er verstand van hebt.
      Vriendelijke groet René.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      @@renelok6847 Haha je moet het maar net weten ;) Succes en let me know when you need anything!

  • @GustyBroadcast
    @GustyBroadcast 2 ปีที่แล้ว +2

    Amazing video, could you do one with firebase auth?

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Thank you! I'll see if I can do that :)

  • @Phil41211
    @Phil41211 2 ปีที่แล้ว

    Could you please post a snipped on how to sync between offline DB and online DB? That would help me so much! Thanks

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      A feature like that usually isn’t just a snippet of code you can’t paste in unfortunately. It’s actually a pretty hard problem and very much depends on your situation how to implement it

  • @locofriends
    @locofriends 2 ปีที่แล้ว

    Hi Gerald, Is possible to use a connection string to Firebase?, currently my project use connection string

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      What project do you have now? I guess there are multiple ways to connect, a connection string might be one of them. Not sure :)

  • @0ptimus769
    @0ptimus769 2 ปีที่แล้ว

    Hi Gerald, i have a question how can i add another property in records and read it i tried so much but icouldnot do it

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      The advantage of a document database is that you can just add properties and they should be available.

  • @gmotagi3165
    @gmotagi3165 2 ปีที่แล้ว

    Do you know how it deals with a no network situation when the db has been updated while the client is offline?

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      I think you will have to figure out something for that :)
      You can use Essentials: th-cam.com/video/aA-sA0ACum0/w-d-xo.html

  • @madraven37
    @madraven37 ปีที่แล้ว

    Hello sir, It's me again. I was wondering, how can we use the SQL query "Select * from TableName where Field1 like "+ entryname.Text +" to Firebase RTDB? Or is there anyway to do this or not?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      That's not possible, at least not with this plugin

  • @madraven37
    @madraven37 2 ปีที่แล้ว +2

    more more more 😅😅.. anyway, thank you for this... I'm expecting another firebase videos soon...

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Which one do you want to see?

    • @madraven37
      @madraven37 2 ปีที่แล้ว

      @@jfversluis it will be good if we could have a chance to have an OTP with firebase and Xamarin.Forms 😀😀

    • @madraven37
      @madraven37 2 ปีที่แล้ว

      @@jfversluis I'm very new to this rtdb with firebase, I just wanna ask, is it possible to have a relational database with firebase just like azure??

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Possibly, but not with the real-time database

  • @vuthuan197ss
    @vuthuan197ss 2 ปีที่แล้ว

    I regularly watch your channel about xamarin forms . I have a very concern about displaying pdf file data right inside the application screen. Can you do about that. I did a lot of research, but it seems that the above methods all have a black border around it, making it not very beautiful. I will thank you very much if this topic is of interest... plea

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Did you see the video I have on that already?

    • @vuthuan197ss
      @vuthuan197ss 2 ปีที่แล้ว

      @@jfversluis i don't want it to have a frameset when used with webview and pdfjs . I have seen a form that shows it as that of a samsung note

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      @@vuthuan197ss then I think your best option is to use a component from Telerik or SyncFusion etc

  • @drawndown4518
    @drawndown4518 2 ปีที่แล้ว

    How about using the FireSharp library? Please demo.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Oh cool! Didn't know about that one, I will put it on the list :)

  • @powerappsperu
    @powerappsperu 9 หลายเดือนก่อน

    example in net maui? thx new sub

  • @billymendozapanopio5998
    @billymendozapanopio5998 2 ปีที่แล้ว

    Hi Gerald! Can you make a video/sample project using Cloud Firestore with xamarin.forms? and comparison between Realtime Database vs Cloud Firestore. Thanks!

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Hey there, thanks for the suggestion! Unfortunately, probably not anytime soon and as .NET MAUI comes closer I think that is where my focus will be going to the foreseeable future

    • @billymendozapanopio5998
      @billymendozapanopio5998 2 ปีที่แล้ว

      @@jfversluis That's fine, looking forward for more MAUI content. Thanks!

  • @JoeBagodonuts7729
    @JoeBagodonuts7729 2 ปีที่แล้ว

    Gerald - I would be really grateful if you have, or can direct me to, a tutorial on displaying forbade push notifications on xamarin apps while the phone is shut off (like you can do with internal notifications (??))

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      You mean like this one? Implement Push Notifications with FCM and Xamarin.Forms
      th-cam.com/play/PLfbOp004UaYX5B2pKKp5j7QPniyLMPkSO.html

    • @JoeBagodonuts7729
      @JoeBagodonuts7729 2 ปีที่แล้ว

      @@jfversluis I’ve implemented that - unless I did something wrong, I only see the notifications when the screen is turned on…

    • @JoeBagodonuts7729
      @JoeBagodonuts7729 2 ปีที่แล้ว

      @@jfversluis could be I’ve over looked something. I can double-check…

  • @carlosvela31
    @carlosvela31 2 ปีที่แล้ว

    Hi, thanks for the video, I have a question... How can I do to have a Shared Project?, I create one but don't show on my main project.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      I’m sorry but I’m not really sure what you mean

    • @carlosvela31
      @carlosvela31 2 ปีที่แล้ว

      ​@@jfversluis In the video, you have the app client and the app server, how do you do to have this?

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      @@carlosvela31 That is something I added myself :)

    • @carlosvela31
      @carlosvela31 2 ปีที่แล้ว

      @@jfversluis Hi Gerald, I have other question, with this process, can I do the same but now using photos?

  • @nosolocodigos
    @nosolocodigos 2 ปีที่แล้ว

    Gerald, is there a way to use firebase app check feature with xamarin forms?

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Sorry I’m not sure what you mean? :)

    • @nosolocodigos
      @nosolocodigos 2 ปีที่แล้ว

      @@jfversluis firebase app check is a feature that allow only accessing firebase from an unique application name or url.

    • @alessandrosimonelli5878
      @alessandrosimonelli5878 2 ปีที่แล้ว +1

      @@nosolocodigos actually I found a nuget package that handles app check but it is in beta version. Do you know if there is a way to access the android and ios app device check and safetynet?

    • @JuanCarlosGuerrero182
      @JuanCarlosGuerrero182 ปีที่แล้ว

      @@alessandrosimonelli5878 Did you manage to implement app check in your xamarin forms app? @Geral Versluis

  • @takacao8373
    @takacao8373 8 หลายเดือนก่อน

    I don't think this code pull the data that has already been there. Am I wrong?

    • @jfversluis
      @jfversluis  8 หลายเดือนก่อน

      Im not sure what you mean

    • @takacao8373
      @takacao8373 8 หลายเดือนก่อน

      @@jfversluis I was wrong, your code does pull the data that has already existed in the database but after a delay. I was wondering why it's working similarly like an async method but it does not have a built-in method that wait until the operation is done.

  • @jvillaro
    @jvillaro 2 ปีที่แล้ว

    Oh man I missed it! Stupid TH-cam notifications

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Oh no! Sorry about that! Glad you still got to see it!

  • @MihaiMoisei
    @MihaiMoisei 2 ปีที่แล้ว

    The old 3-way binding.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว

      Recipe for disaster!