how can i access database inside android appication to my computer - android

I am developing an app in our college for an event.i wanted to get the value of a variable in that app after every round from all the phones to my computer.How can i do that?

There are many ways but one way
Create a JSON object containing data you want to store on database.
Create mysql database in your computer, i use Wamp Server or any of
your choice
Write PHP code with which you can interact with your
database (read/write on your database) (read JSON object sent by app
and inreturn Send JSON responce you create in php)

If you want to browse information in database then you can use sqlite master pro app for android but your phone must be rooted. If you want to send database info to computer(server) then you need to write webservice in php or in other language

Related

how to make an android app that downloads dynamic forms from mysql database and uploading them the record after filling them?

im making an android-based data collection app similar to ODKcollect as a college project and im not that good so..
1-how to make a web service and connect my app to mysql database and which language is better for a web-service (PS:my data maycontain images)
2-how to make dynamic form templates then retrieving them from database and making them in the android app.
You can use php for that, You can write a php script that retrieve values from Mysql Database and then decode them to JSON and parse them to the android app. and another script to make the vice-versa Take a JSON response from your app and insert it into the Database.
There was a course in udemy that achieves such pattern you might want to check it

How to share my to do list app data between 2 android devices

I am working on to do list app and I saved data in SQLITE and I want to share app data to my friend who install my app but he away from me with along distance so I can't use Bluetooth and socket.
Please help me and thanks in advance .
https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
You could have used your own backend web service and send it through with JSON data. If you do not want to create a backend service, just use firebase cloud real time database which is very suitable for your project. Firebase Database Instead of creating local SQLite database, save your data into the database which is in the cloud, whenever your friend open the activity or application, fetch data from backend service/firebase database whatever you like

Transferring data from Sql server to SQLITE with Android

I have software that connects to an SQL database. I am now working on the software on Android, using SQLite, and need to transfer the SQL database (with the data) to SQLite.
How can I do this?
One way would be to create the SQLite database on the device and download and persist the data into the local SQLite data base. A good place to read up on how to do this is in the Android docs.
Another possible solution would be to create the SQLite database at the server level and download it directly within the Android app then open it. But if you modify anything locally within the app you would need to send data back to the server to keep in sync.
Create Rest API that will fetch my SQL data in JSON format.
Now from android app access that API to get data and insert that data in in your SQLite.
or if you want to fetch it in background process use sync Adapter.

Update the web database using Android app?

I want to update the database of my website basically android app is getting data from pc it than process it and send it to the web database which store it and when ever android required that data it can get it from that database.
Now my question is how can I send it to the database at a specific place?
Assuming you host the web server hosting the database. You could then package your data (in android) using JSON format, and send the data over using Httppost. Found a good example of code shown in https://fahmirahman.wordpress.com/2011/04/26/the-simplest-way-to-post-parameters-between-android-and-php/ (although the web is just a PHP, you could then expand how to update PHP with MySQL etc). Hope this helps.

External Database and Android application

I am creating an android application which records soccer scores.
I have an external mysql database created on my own host.
How do i retrieve the data from the database in order to display it in my application?
Thanks in advance!
You need to write a service hosted on your database using either php or some other language you are comfortable which exposes data as XML/JSON.
Android has HTTPURLConnection capability,using which you can query your service by passing the parameters. Your service queries database and consturcts data either as XML or JSON using libraries and returns to app.
Your app need to parse the response (if XML, using SAX/DOM or someother APIs, if JSON using Android in-buit json parser) and display. Here is an example on how to do.
If you also want to retrive the information to be used offline, you can create an empty database locally, and update it by passing SQL statements. This is not the most efficient way to do it, but it worked for me since I am not working with a huge db.
Otherwise, use HTTP connection connecting to your remote host and pass the result via JSON object.

Categories

Resources