Would anybody have any code that I could look at on how to connect my Android Studio app to my online SQL database?

I'm really struggling to get it working, I simply just want to log-in a user.
I've tried many tutorials but none have worked and I would appreciate help when doing it.

Thanks in advance