How to Make a Chat App With Ktor - Building the Server - Part 1

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 96

  • @Sivien
    @Sivien 3 года назад +30

    Video's like this are what makes your channel awesome.

  • @tanjimahmed213
    @tanjimahmed213 3 года назад +7

    Didn't watched the full video but very excited. Thanks Phillip for awesome tutorial

  • @ARIHANTJAIN27
    @ARIHANTJAIN27 3 года назад +27

    I have two suggestions.
    1. It would be great if you explain the entire process first and relations between all model before starting the code.
    2. You can also add WebRTC examples to manage audio chat, video chat, and file sharing in this playlist.

    • @arshsethi8596
      @arshsethi8596 2 года назад +1

      +1 even if it is at last it's also fine. It would be helpful if you explain how everything works by going file by file and explaining it all at the end of the video

  • @vengateshm2122
    @vengateshm2122 3 года назад +8

    Very well organized content. I every time watch your videos and develop the same side by side to understand the concepts. Thanks man. Because of your videos I am up t date on android development APIs. God bless you.

  • @alanramirez1031
    @alanramirez1031 3 года назад +3

    Just finished your other Ktor videos, great timing, thanks

  • @brandonquintanillaquispe5455
    @brandonquintanillaquispe5455 3 года назад

    Philipp, man, you are awasome. The community will remember you.

  • @SmartSoftek
    @SmartSoftek 3 года назад +2

    Another awesome playlist, thank you Philipp. And keep going this way

  • @kinggeorges625
    @kinggeorges625 3 года назад +3

    Thanks for the video. Great work as always

  • @emmanuelonwumah915
    @emmanuelonwumah915 3 года назад

    Ktor tutorials are my favorite right now

  • @crateer
    @crateer 3 года назад +1

    You are a living legend - keep up the great work =)

  • @footballCartoon91
    @footballCartoon91 Год назад

    for people who does not know how to setup the initially required files of gradle and kotlin dependency from ktor..
    1. first install git
    2. then put that git executable or script path to the environment variable in the system variable (not local)
    3. add the file path of intellij's executable too into the system's environment variable
    4. enter the file path that we are interested to create the project in the cmd
    5. clone the repository by writing git clone
    6. open the project by writing ```idea64 .``` `.` means the relative path to current working directory
    7. you are good to follow the tutorial

  • @FurkanAyazTR
    @FurkanAyazTR 2 месяца назад

    Thank you for this tutorial 😊

  • @leogsantos2010
    @leogsantos2010 3 года назад

    Very nice! Waiting for the app part.

  • @TempoDeAirdrop
    @TempoDeAirdrop 10 месяцев назад

    Nice class!! Till here working

  • @zafar_codes
    @zafar_codes 3 года назад +2

    This is awesome, thanks.

  • @dkyadav5322
    @dkyadav5322 3 года назад

    This gonna be lit🔥🔥🔥🔥

  • @tanjimahmed213
    @tanjimahmed213 3 года назад +1

    For swap line quickly -> ctrl+shift+up or down arrow

  • @shaikhshafeen
    @shaikhshafeen 3 года назад

    Another quality content!

  • @スヘア
    @スヘア 3 года назад

    Thanks, I was looking for this.

  • @muzamilabdallah6768
    @muzamilabdallah6768 3 года назад

    Its very awesome tutorial , so exciting

  • @raja_uma1r
    @raja_uma1r Год назад +1

    Can someone explain the send message function, I think there are unnecessary objects being created in the loop 29:45.. The loop parameter is only used in the last line when message is broadcasted to all the members and that should be the only line inside the loop and others should be outside the loop like creating the Message object and calling the database function insertMessage.

    • @eklavya-_-
      @eklavya-_- 8 месяцев назад

      I was thinking the exact same thing. Did you try it without looping other objects and just the send function to broadcast message to all members?

  • @tiamabderezai5374
    @tiamabderezai5374 3 года назад

    Really enjoy your videos

  • @venkatesh4307
    @venkatesh4307 3 года назад +2

    Thank you ❤️

  • @clo4k661
    @clo4k661 3 года назад +1

    Which product do you use in hair?

  • @gala3941
    @gala3941 2 года назад +3

    Phillip hi! Need help on the task @44 min with Koin's mainModule installation, after the curlybracers appear questionMarks instead of "this koinApp". Doing exactly the same. How would you solve this today with 2.0 ktor version + koin new version?
    1.6.7 ver worked but still, how would you do this with ktor of 2.0 version? Best regards!

    • @anirudh7137
      @anirudh7137 2 года назад +2

      Koin version 3.2.2 is now compatible with Ktor version 2.2.2

    • @Badwatermagic
      @Badwatermagic Год назад

      @@anirudh7137 thank you and Gal for the help. I was stuck on this all day yesterday.

  • @trejkaz
    @trejkaz 2 года назад +1

    The hard part of ktor, which I'm trying to figure out, is how to use the base library to do normal socket stuff, with multithreaded support.
    Unfortunately all the tutorials out there are assuming websockets, but for websockets, they have a way more convenient framework. :(

  • @leogsantos2010
    @leogsantos2010 3 года назад +1

    What program u use for record this videos with this effect of zoom?

  • @sovrinfo
    @sovrinfo 3 года назад +1

    Thank you a lot!! Cool

  • @footballCartoon91
    @footballCartoon91 Год назад

    @20:50 i was stuck thinking what is that `*` means in the parameter of function descendingSort() defined by mongodb package..it turns out the property of `KProperty` class is of type varargs in which case it is a Generic type but at the same time it is a varargs so basically it is like void pointer in C++

    • @footballCartoon91
      @footballCartoon91 Год назад

      @25:39 i think for the `onJoin()` method we can create the function to take `Member` instance/object as parameter to the function because we already define it in the .room folder

    • @footballCartoon91
      @footballCartoon91 Год назад

      but then data class need to be supplied with at least one argument..so this will only work with one instance of `Member` but not all instances

    • @footballCartoon91
      @footballCartoon91 Год назад

      maybe we can supply the constructor with default value..initialized it with few bytes of character

    • @footballCartoon91
      @footballCartoon91 Год назад

      `WebSocketSession` is an `interface` so we cannot initialise it in the `Member` constructor

    • @footballCartoon91
      @footballCartoon91 Год назад

      @26:33 very weird syntax to pass the value from function parameter to a class's backing field

  • @zakmiltan
    @zakmiltan Год назад

    Hey not sure but is there any particular reason using mongo, why not using room instead

  • @thetester8371
    @thetester8371 3 года назад +1

    Are you implementing pagination in this app?

  • @sushant-chauhan-08
    @sushant-chauhan-08 15 дней назад

    Suppose if there are more then two users will all will be chatting in the same room.? Can anybody explain.

  • @userbard-e9y
    @userbard-e9y Год назад

    Great video

  • @leonzhong3985
    @leonzhong3985 2 года назад

    Thank you!🥰

  • @mracipayam
    @mracipayam Год назад

    Greate series!

  • @shivamprasad782
    @shivamprasad782 2 года назад

    I'm getting connection closed on piesocket when running the project cloned from github. How do I debug this?

  • @akshat3089
    @akshat3089 3 года назад

    I am not able to understand the line intercept(ApplicationCallPipeline.Features), Can anyone explain it ??

  • @dendrit77
    @dendrit77 10 месяцев назад

    Just great!

  • @jitendrapratap6327
    @jitendrapratap6327 3 года назад

    Do i have to create database in mongo myself or it will create itself when running for the first time.

  • @germenwong
    @germenwong Год назад

    Hey... Great tutorials as always.
    I followed along and I am getting an error(Session data for `Guest` was not registered)

  • @CyberSoftSolution
    @CyberSoftSolution 3 года назад +1

    Android Studio said that Ktor is Depricated :( ?????

  • @علیرضانیکفال-ظ4ل
    @علیرضانیکفال-ظ4ل 3 года назад

    thank you for this

  • @patrik956
    @patrik956 3 года назад +1

    I would like you to implement "is writing" feature

    • @PhilippLackner
      @PhilippLackner  3 года назад +1

      that's a good practice for you at home

    • @patrik956
      @patrik956 3 года назад

      @@PhilippLackner I dont have idea how to do this you know

    • @vedx
      @vedx 3 года назад +2

      @@patrik956 you have an open web socket just. On app side observe if user is writing on key board then just send web socket message to server and then broadcast to all the members.

  • @devhintsandtips9013
    @devhintsandtips9013 3 года назад

    very awesome video

  • @MichaelTirkey0719
    @MichaelTirkey0719 3 года назад +1

    Hey... Great tutorials as always. :)
    I followed along and I am getting an error(MissingApplicationFeatureException: Application feature Sessions is not installed) in chatSocket when getting the Chat Session. I tried figuring out the error but wasn't successful. Anything I might have missed here ?

    • @PhilippLackner
      @PhilippLackner  3 года назад +2

      Looks like you need to install the sessions feature

    • @MichaelTirkey0719
      @MichaelTirkey0719 3 года назад

      @@PhilippLackner Got the issue. Thank you for your response.

  • @negativeprogrammer3802
    @negativeprogrammer3802 3 года назад

    Nice video...hope you remember me

  • @maskedredstonerproz
    @maskedredstonerproz 3 года назад

    Okay I did not see this coming at all, like seriously at freaking all

  • @adamobranz5052
    @adamobranz5052 2 года назад

    why not send messages via 'post' and use the websocket only to receive them?

    • @PhilippLackner
      @PhilippLackner  2 года назад

      What's the point? You end up having a slower request while still needing the socket

  • @codingwithsam4992
    @codingwithsam4992 3 года назад

    Can I publish it on play store?

  • @Traffic_Pro
    @Traffic_Pro 3 года назад

    I have a question for you. Have you ever spent money to learn mobile development? Or Do you learn it on the internet

  • @HritikUtekar
    @HritikUtekar 3 года назад +1

  • @tixvideo3
    @tixvideo3 Год назад +1

    i tried the exact same thing but i cannot get it to run the server I am getting the following error
    " Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class org.koin.ktor.ext.Koin.Feature, unresolved supertypes: io.ktor.application.ApplicationFeature
    Adding -Xextended-compiler-checks argument might provide additional information. "
    and
    " Type mismatch: inferred type is Koin.Feature but Plugin was expected "
    in the Application.kt implementation on the install method. Please help!

    • @TatataG
      @TatataG 9 месяцев назад

      same err bro, any solution?

  • @rishigupta1347
    @rishigupta1347 Год назад

    Can you please make it with firebase toooo.... please 🥺

  • @AhmadBakdash07
    @AhmadBakdash07 3 года назад +2

    Part 1 , 52min 👀🙃

  • @charlygarcia1060
    @charlygarcia1060 Год назад

    Nice video, thank's

  • @emmanuelonwumah915
    @emmanuelonwumah915 3 года назад

    Tutorial idea, in app subscription in android. Paid version of app vs free version

  • @madalabrahmam969
    @madalabrahmam969 3 года назад

    Can you Please make sample OTT app.

  • @Jaylight977
    @Jaylight977 3 года назад +1

    there is not even a single proper channel on Android development , please please bring more projects

    • @PhilippLackner
      @PhilippLackner  3 года назад

      Not even mine? 🥺

    • @Jaylight977
      @Jaylight977 3 года назад

      @@PhilippLackner no no i don't mean that 😄,I mean there is not any good channel on Android development like your

    • @Jaylight977
      @Jaylight977 3 года назад

      and please bring more projects like howbto creat quiz app,vpn app etc...

  • @maskedredstonerproz
    @maskedredstonerproz 3 года назад +1

    but it IS awesome

  • @damnitjun
    @damnitjun 3 года назад

    trying ti register for hostinger burt got server error .....gg

  • @drekzaa
    @drekzaa 3 года назад +1

    i love you

  • @dendrit77
    @dendrit77 10 месяцев назад

    This app allows you to send only text and what to do if you want to send photos or gifs like in this video? ruclips.net/video/LWbzaYR5TGE/видео.html

  • @mahetachirag8395
    @mahetachirag8395 3 года назад

    I am good fan of yours.
    Disappointed by this video.
    Very less explaination.

  • @adamobranz5052
    @adamobranz5052 2 года назад

    messageDataSource.insertMessage you have to do it outside the forEach otherwise you insert it in the DB as many times as there are members.

  • @thegeniusprogrammer
    @thegeniusprogrammer Год назад +1

  • @ahmadab9666
    @ahmadab9666 Год назад

    thanks alot, this videobetter then tectok game websocket videobecuse you explain every think thanks alog

  • @GeorgeMachibya
    @GeorgeMachibya 2 года назад +3

    I am getting issue on intelliJ when I create a project from Ktor Project Generator and open the project using intelliJ then it will install jvm dependency i.e websockets-jvm and not websockets. this is confusing.