简体   繁体   中英

How to connect to online database in Android Studio

I'm making an Android app that displays my and other groups' university schedule.

I wrote a program that scrapes the schedule and inserts it into remote mysql database. The schedule changes sometimes, so i would need to update it from time to time, that's why i want to be able to download content from online database when an update is available, and then store it locally.

The app is supposed to be public, so i don't want to hard code database credentials into app. I have looked around over here, but I was not able to find a solution that would fit my problem, and also be understandable for me.

This is my first post, I would appreciate any help or advice:D

Welcome. You cannot just connect to your mysql server without exposing your credentials. I would recommend either creating a web service to return your database content or using some third party solution like firebase firestore https://firebase.google.com/docs/firestore , which seems like a good option for your use case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM