I am writing an application for Android, messenger. I do this exclusively for the thesis, I will not release in production. Therefore, I do not implement encryption and generally do not think over security.
At the moment I have implemented all the functions I need, registration, login, add a friend, correspondence. But implemented it all with a local database. That is, when a person clicks the registration, he creates a new login-password entry in the SQLite database on the device. Also with login and correspondence, stored on the device.
I need to implement the registration and login on the server. That is, when the user clicks "register", a line with login and password is requested on the server with MySQL. If there is already one, then transfer the failure to the device, if not, then add these login and password.
Login implementation, similar scheme. If the login and password is in MySQL then we transfer that logged in. If not, we pass the failure.
Actually the question is how to make such registration and authorization on the server? There is an idea to make a php api. And through JSON send a request to the server. But how to get feedback? That is, how to get a response from the server on the device?
Maybe you have more simple and easy implementations of this functionality. Thank you in advance.