First of all, all the best for learning!
To be honest, learning how to develop a messaging application from scratch is actually a big deal. However, what all are the development approaches you’ll take will change the deal.
The available ways of building an instant messaging application include
Determining the objective and purpose of the application
Designing the UI of the app
Considering an Server to host
Choosing the programming language and multi-platform compatibility such as iOS, Android or even web browser.
On the other hand, consider Chat API and SDK for easy integration, reduce time-consuming processes, avoid the learning curve, and of course, plenty of features.
I’d suggest you consider the second step to learn effectively and accommodate the trend.
For the learning asset, follow the MirrorFly tutorial link to understand the process of developing an instant messaging application.
Tutorial: https://youtu.be/_AgBGPgkATg?si=z006B8r893EKgUhr
Check out: https://youtu.be/fce3NzvZvQw?si=_ICvG89kF0Mo4Rrl
GitHub: https://github.com/MirrorFly/MirrorFly-Android-Sample