Android data synchronization from device sqlite to server - android

In my application, I have two data management sources, one through web services and another standby in SQLite database in the device itself. In this, I want to add the feature to transfer the data from the device to server and from server to device if the web services available. Please suggest what would be the best way to perform this implementation.

Virgil Dobjanschi, author of the official Twitter app for Android, describes designing such data handling in his Google I/O 2010 presentation on Android REST client applications.

Related

Shifting data from local android sqlite database to cloud.

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.

Connecting Android to AWS RDS [duplicate]

Background
I have a EC2 instance with a RDS instance(MYSQL) associated with it.
I want to use a android app to execute queries on that MYSQL instance.The Android sdk of amazon does not support RDS.
Problem
How do I connect my android app with RDS instance?Is it possible to use RDS(MYSQL) with an android application without sdk support?
RDS is not a database engine. It's a service that manages the infrastructure for you that's required to maintain a highly available and fault tolerant database. It supports a number of different engines such as MySQL as you mentioned. Please read the docs for more information.
You need to connect to your RDS MySQL instance the same way you would connect to any MySQL database. Using a library that supports MySQL, and using the hostname, username and password for your database.
However, it's probably not the best design to have phone clients connecting to your database remotely. The best thing to do would be to put a REST API on AWS that interfaces with your database.
Having n users connected to your database from each handset using your app is probably a bad idea. It means you need to have more power in your database, greatly hinders your scalability and makes things less secure as the database is exposed to the internet. With an API in front of it, you can build a much more fault tolerant, scalable and solution.
The "cloud way" to build mobile apps is to (within reason) build your application logic on the cloud and simply have your client code connect to your API. This way you can spread to more platforms (eg. IOS, Web) much more easily as you won't have to manage separate application level code for each platform. You'll just need to manage code that integrates with your already existing API.
Take a look at this whitepaper. Ignore the web server tier and focus on the App Server and Database tiers. This is probably the best design to go by.

Using Amazon RDS with android application

Background
I have a EC2 instance with a RDS instance(MYSQL) associated with it.
I want to use a android app to execute queries on that MYSQL instance.The Android sdk of amazon does not support RDS.
Problem
How do I connect my android app with RDS instance?Is it possible to use RDS(MYSQL) with an android application without sdk support?
RDS is not a database engine. It's a service that manages the infrastructure for you that's required to maintain a highly available and fault tolerant database. It supports a number of different engines such as MySQL as you mentioned. Please read the docs for more information.
You need to connect to your RDS MySQL instance the same way you would connect to any MySQL database. Using a library that supports MySQL, and using the hostname, username and password for your database.
However, it's probably not the best design to have phone clients connecting to your database remotely. The best thing to do would be to put a REST API on AWS that interfaces with your database.
Having n users connected to your database from each handset using your app is probably a bad idea. It means you need to have more power in your database, greatly hinders your scalability and makes things less secure as the database is exposed to the internet. With an API in front of it, you can build a much more fault tolerant, scalable and solution.
The "cloud way" to build mobile apps is to (within reason) build your application logic on the cloud and simply have your client code connect to your API. This way you can spread to more platforms (eg. IOS, Web) much more easily as you won't have to manage separate application level code for each platform. You'll just need to manage code that integrates with your already existing API.
Take a look at this whitepaper. Ignore the web server tier and focus on the App Server and Database tiers. This is probably the best design to go by.

How to store data in cloud from android app?

Friends I'm Planning to design an application such a way that user has to login and he has to enter the data to be stored in cloud and if he opens the account the data should be edited other wise it should display the data.
I would look into solutions such as couchbase:
Apache CouchDB on Android provides a simple way to sync your application data across devices and provide cloud backup of user data. Unlike other cloud solutions, the data is hosted on the device by Couchbase Mobile, so even when the network is down or slow (airplane, subway, backyard) the application is responsive to users.
What this means for you:
You can embed the rock solid distributed database, Mobile Couchbase,
on your Android device. Your Android apps can use Apache CouchDB's
well-proven synchronization technology. If you <3 CouchApps, you can
deploy them as Android apps.
check it out here

cloud service for mobile application development

I am starting a project to develop an application for WP7 and Android which uses Windows Azure cloud services. The cloud service periodically sends some data stored in its database to some of the registered mobile devices, based on some rules.
There should be a way to install a custom VM on Azure so that this VM can decide when to send data to which mobile device. With "Windows Azure Toolkit" it is possible for the mobile application to store data on Azure and retrieve the data later, but I can't see how it would be possible to leverage a VM installed on Azure using this toolkit.
Is this possible at all or not? If yes, from where I should start developing the application?
Thanks in advance
Though I generally recommend using Mobile Services and the scenario you describe is relatively easy to accomplish with Mobile Services (You'd just write a server script in JavaScript that's triggered by a CRUD action or that's scheduled to run at a given time interval to users that meet certain criteria), unfortunately you're targeting two platforms that aren't officially supported at the moment.
There are unofficial SDKS available now that you could use if you'd like (and an official Android SDK is on the roadmap):
Android: https://github.com/goldshtn/wams-android
WP7: https://github.com/zaxy78/azure-mobile-wp7-sdk
You can also access the REST API directly here: http://msdn.microsoft.com/en-us/library/windowsazure/jj710108.aspx
Otherwise, you can always use Cloud Services, Microsoft's main PaaS offering. You'd probably need a small worker role to accomplish what you detail above.
The "Windows Azure Mobile Services" are a collection of utilities that you don't need to manage and take away a lot of the hosting and configuration issues from you. They add features such as scalability, etc. but the down side is that you don't have as much control over them.
If you must have the code in a VM then you'll need to write it yourself. For Windows Phone you should have a look at this helper library.

Categories

Resources