Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What is the best way for get data form MS SQL server remote for Android application?
Use JDBC ? or create something like API REST? or something else?
How did succided or had other resolf this problem?
You need to expose a WebService and connect to it with Android. You need to do query or everything else directly from your webservice and not from android. Check out these links:
How to Connect a Webservice to an Android Application
How to connect Android app to MySQL database?
http://m-zeeshanarif.blogspot.com/2013/05/android-connecting-to-server-mysql.html
Do not directly connect to the database. The reason is quite simple: Anyone can get access to your database when decompiling your app. Once done this person can execute CRUD-operations on your database.
The best way is to write/have a server which accepts and handles commands send from your app.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am developing an android application, in that application i simply created login page in that login page i need to load mssql database for login. Please tell the solution and example coding for this one
Wow this is a really complicated!! The apps can't connect directly with server how do websites... Remember the devices it's possible lose internet, then how you connect with you server database? The most important of devices is can work offline, in this moment our app needs a webservice (API) to connect with database from server. Read this posts for more info (that includes code)!
What is a webservice?
How we do an API? (Server part)
How we connect our android device with server? (Device part)
Other important post:
WebService vs API
Restful vs Other Web Services
Tell me if I helped you and good programming!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am developing an android application using node.js and mongodb .I followed following link-
http://www.learn2crack.com/2014/04/android-login-registration-nodejs-server.html.
i am successful in running app with localhost on emulator.now i want to keep my database on server and to run app on any device.What steps are required to run node.js and mongodb database on server,and access it through android app using a url.
help appreciated.
Since you are running your Node.js and MongoDB on the server then you simply need to implement an HTTP client of some kind to access the server.
One simple way is to use a WebView so that you do not have to parse the results, etc. It is simply displayed in your app as a website would be.
Alternatively, you can use something like Jsoup or another HTML/XMl parser to parse page requests into data that your app uses.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
we are using SQL 2012 with windows software. Now we need a mobile application to access this data, it might be a huge amount of data, Can we use easily SQL Server on android applications.
First of all you need to decide where will the data stay. Is it going to be accessed via web or it'll stay in the phone locally.
If it's going to be accessed via web than you'll need to put this data on a web server and create an API to be accessed. You can use ASP .net Web API or can even use simple PHP with that (I am not sure how good php works with SQL Server databases). The mobile app will call the API to get the data.
If it's going to stay in the device then you should really use SQLite, since it's very lightweight and has good native support in Android and iOS both.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i want to build one app which can upload data to the website database. Now i using XAMPP for my android database. How to upload data from android to the website database? Can i use XAMPP as well? Thanks
Regards,
YY
I would recommend creating a PHP RESTful web service that connects to your MySQL database.
Transferring your data in a JSON format is the most common way, depending on what you have to upload.
There are several ways to call the web service in Android. You could go basic and use a HttpUrlConnection to do the job, or use libraries such as OkHttp. Just remember to run web service calls (or any network process) in a different thread by using an IntentService, Service, AsyncTask (watch out, pitfalls), AsyncTaskLoader, etc...
Don't forget to check out this on the Developer site as well.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I've been doing my own research but to no avail. I am doing an android app which contains listviews and it needs to query data from a remote database. I would really appreciate it if someone could share good tutorial links that teach that kind of stuff. Sorry, I know this isn't a proper question but I really need some help. Thanks.
You can refer to this tutorial
Or refer to this
How about a simple web service in the middle?
It helps to prevent you putting database username/pw directly in the app too.
App -> Http requests -> Web service -> Database
The Http requests can be done via Android HttpClient
The web service can be in php for example. (There is a lot example for php to database on google.)
To communicate with the remote databse, you require web service which can fetch data from or suit data to remote database.
I am not sure about which web platforms are you using currently but I would suggest you to go with REST with JSON.
This is the typical case of SyncAdapter with it you can use the remote database from your content provider as a regular DB.
I have done it and it works well with only few complexities.