简体   繁体   中英

Web application + android app, how handle db connection on android

Recently I'm working on online application (Spring+Hibernate) and I also would like to have mobile app (android). Hibernate talks with DB in the web application, now, I have no idea how to communicate with DB from mobile, should I do it somehow through my web application, or do I have to create new one for that purpose, or maybe web services?

All feedback, comments and advices are highly appriciated!

Thans,

您应该为您的Web应用程序编写一个API。

Android provides a built in SQLite Database which can be accessed from code via SQLiteDatabase Class which is part of the android SDK. Just google the web for Tutorials, you will find plenty.

Ok, you want to communicate with the DB on the web server, sorry about that. Not sure how to do with Hibernate, but you can use JDBC to remotely connect to your database from the phone. This works with normal Java code.

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