I have a desktop application in .NET and I want to make an Android application which will sync its database to the desktop without using the Internet. Is there any way to sync this database over a USB connection?
In Android I'm storing the data in a SQLite database.
Yes you can. You need to create your database using SqliteDatabase.create(). And give to it SD-Card path. then you can download this file to your pc, manipulate it and upload it back to to your android device.
Related
I'm trying to build an Android app where the database is on the server side.I hear that SQLite is a local database so it doesn't really work for what I'm trying to do.
In java I would use JDBC to connect to MySQL and send requests normally.
In PHP too it's almost the same thing.
The app needs a login system and all of that...
How can I do this in Android ?
Android does not support MySQL out of the box, but you can implement it.
Probably the SQLite you heard about, in the Android environment, refers to Room, the standard to save persistent data locally on the device.
In the mobile world, often a good option (if they fits for you) are NoSQL databases. There are plenty, hosted services like Firebase, DynamoDB or open source like MongoDB, Supabase.
I've created an Android App which the user creates data in an SQLite database and also creates picture and audio files. The next stage is to create an offline sync to Microsoft Azure (SQL Server and Blob Storage). There will be multiple devices for the App which all need to sync, so data on all devices will be the same.
What is the best method that encapsulates Android App SQLite to Microsoft SQL Server and created files to blob storage in Azure which will handle two way sync?
I've looked at Azure's MobileServiceClient but don't think that totally fits my needs as its just data tables. Maybe Sync Adapter instead?
I'm thinking I should create my own sync but not sure where to start? I think in the app i want to keep a changes table so when data is created or changed its logged in the table and then when it syncs it looks at this table and transfers the data and files. Then on the server side I'm not sure how to handle syncs from multiple devices so that all devices have the same data.
Anyway any pointers would be great.
Thanks
There is a similar SO thread Upload images to Azure Blob Storage from an Android device With Offline Sync which discussed about offline sync for files with Azure Storage, that may helpful for you, but now Azure Mobile SDK for Android in Java doesn't support it, just implement the feature by self. If using Xamarin for Android, there is a solution introduced in the offical blog, that you can refer to and possibly implement this in Java.
Hope it helps.
I want to connect my android application with a SQL database which is stored in an another computer. I want to use that computer as a server. I think there is a method to connect with that server computer using it's IP address. I use android studio when developing the android application.
Can anyone help me to fix this problem?
I would not recommend you to connect directly to the database from the application, if you plan to publish the app. You open a port to the database server to everyone and store the password to the database in the user device. Anyone who wants to retrieve data from your SQL Server just needs to open the application in a hex editor or decompile it in order to retrieve the password.
Always use an API through a webserver that gets you desired information.
You could use the Firebase Realtime Database to sync specific data, if you do not trust Google then build your own API.
https://firebase.google.com/docs/database/
I have an app that currently runs on a wamp server on my computer because it uses sql databases. I want a way to see the application (including the sql databases data) on my tablet. It just needs to be a local connection. When I download the app at the moment, I see the app but it doesn't show the sql databases. How can I setup so that the tablet uses the computer as a server to view everything?
You may try native web servers for Android, like kWS
I recently wrote and installed an Android app on my device. The app wrote data to the local SQL database and uploaded this data to my webserver. But due to network problems, there are a few records that were skipped, so they aren't on my webserver.
Now i want to get those rows (or my full SQL database) from my android device. But my question is how?
If I write a new version of my app and reinstall it, then all my data will be lost.
Isn't there a way to access my SQL database without losing my data?
My device is not rooted, so those backup app's won't work...
You may get access using DDMS.