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.
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 made an android application which is collecting data from a wearable device and storing it into a local sqlite database.
Now I want to sync the data of all android devices local sqlite databases to cloud and visualize the data and perform data analytics related operations on it.
Can anyone suggest me what to do?
I have looked around multiple clouds like AWS, GAE, AZURE, HEROKU, GoDadddy shared cloud etc for storing my data in a central database.
My question is that should I directly store data from android into mysql or some other database using jdbc or odbc driver or write a webservice or api for storing data in cloud?
I want to sync data after some time interval i.e. a day or so, between local android device and cloud.
According to your description, based on my understanding, you want to sync up the data from wearable device between all android devices and cloud.
Per my experience, the way to directly store data from android into database is not a good choice. The normal way is creating a web service or rest apis to communicate with mobile device for data synchronizing to cloud.
On Azure, the best practice for your needs is that creating an Azure Mobile App instance and enable the Offline Data Sync feature in Azure Mobile Apps to implement this. You can refer to the Azure offical document Offline Data Sync in Azure Mobile Apps to know the related concept.
You can get start with the tutorial for Android within Azure Mobile Apps, and then continous to the next tutorial to implement the feature of offline sync up data automatically.
As reference, the tutorial How to use the Android client library for Mobile Apps will shows you how to use the Android client SDK for Mobile Apps to access the data from SQL Azure table online.
Meanwhile, to visualize the data and perform data analytics related operations on the cloud data, Azure support more Intelligence + Analysis services which could be used for your future plan.
I'm very new to working with databases in general! I'm working with DynamoDB for a mobile app and I recently discovered that I could use Python to script table creation and data entry by running DynamoDB locally on my computer. Now, intuitively, I thought there must be a way to test my database and locally, but then push the changes to my server hosted DB. But after countless searches on Google, I still can't find a way to do so and it doesn't seem like this concept exists?
Can anyone fill in the blanks for me here? Thanks!
Are you using DynamoDBLocal for testing your changes?
If so, DynamoDBLocal is meant to be a standalone application purely for offline testing. There is no way or mechanism to sync the changes to the local database to the API hosted service.
I want to write an application that receives some data from the cloud. Additionally the data should be accessable, when the user is offline, which means I have to store it locally (sqlite or smth. similar).
Last week I read about CouchDB Mobile. This would be my solution if I would use a couchdb as online storage. But I don't want to use couchdb as online storage. Instead I am using Objectify in an appengine environment.
Is there a framework, which stores requested data local and checks for updates automatically? Or do I have to write that by my own?
I don't know of such framework that keeps a local copy of remotely accessed data from Datastore.
You could use the App Engine Java remote_api in conjuction with sqlite to keep a copy of the data locally and safe among app switches.
On the other hand that could raise an issue of consistency if the data kept locally has been modified by someone else in Datastore.
There is no such thing that I'm aware of.
Android has sync adapters, but that is just one piece - not an equivelent of what CouchDB does:
http://developer.android.com/training/sync-adapters/index.html
The new 'google cloud save' feature of play services, which is currently in closed beta, sounds like it could develop in that direction - currently it just makes saving/loading from datastore simple.
https://developer.android.com/google/gcs/index.html
And I don't think there is a silver bullet anyway. A framework can do a lot for you on the client, but sync'ing logic is not generic on the server side.
Check this out, i think titanium have an api to handle data sync.
http://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_Sync_Adapters_and_Migrations
so I am writing an android app that will be used at a point of sale in some shops for survey questions. I have a java jsf web app using jpa with a mysql database that I want to sync with, preferably both ways but only a couple of tables. The android app will have only a few tables and will not replicate my server database completely. Unfortunately the android apps will in some places have only intermittent internet access that will drop in and out. I am currently looking at different options to use to store my data on android. I have looked at:
writing my own sync between the database on my server and SQLite on android but there has to be an easier option
storing my data on app engine and syncing with app engine as per the example in the android developers guide however I am not sure how my limited internet connectivity will work
using couchdb but I dont really want to go down this route as I already have the server side set up
does anyone have any ideas?
can I store data locally using android then sync with app engine when I have a connection?
Thanks