简体   繁体   中英

Android and MongoDB store and retrieve data

I have created several basic android apps but I am relatively new to connecting db with android. I have a simple page that asks the user to enter a name and password. When a button is clicked the data needs to be stored in an online DB. I have created a Mongolab account and have installed mongodb in my computer. I have referred many websites but none of them give a clear cut answer on how to achieve this action.Some say use node.js ,REST and all the other stuff. I dont even know what these mean. My need is to send these two string in the db. What should i do next? Any sites that provide an answer will be helpful. If you need to see any part of my coding I will post it.

thanks in advance

Mongodb is like any other physical storage DB. It is not "online" or "offline". It listens to connection request in some port and returns data to the queries.

You made a Mongolab account which provides you a online easy install and acccess mongodb database. Mongodb also can be installed locally in your computer. You don´t need Mongolab for work with mongodb. I think that Mongolab stuff has confused you.

What you ask for its the same than connect to a MySQL database directly from Android code without backend server request.

I recommend you to make your own server + database with the technology that you want or use a service like parse . Parse easily set ups a backend for your app.

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