Mobile Development and Cloud Database, Where Should I Start? - android

I am an Android Developer and a noob when it comes to web technologies.
I am planning to create an Android app that stores its data to a database.
I do not want to maintain my own server so I guess I would be resorting to Cloud Services.
The thing is I do not know where to start.
What do I need to be able to access and store data to a cloud database from my Android app?
Where can I get a cloud database preferably for free.
Do I need to use web services?
Any help

There are a few things in this that make me ask questions, as opposed to answer them.
Do you mean for your application to be always able to communicate with the database, or will it be more of a backup/sync with a database you have on your handheld.
If you do intended the app to be live all the time, then just write a web app and construct it with small screens in mind. It would be faster and sort of cross platform.
If you intend to have the app just sync with a back-end.. Well then a simple web service should do you for storage. Yep. Rails would be the way to go.
It really depends on your users.. How will they be using the app? Where will they be?
Personally I like the stand alone application that just sync's with the back-end. It is less prone to crashing because I walked into a tunnel. It also lets me control when and where I am when I sync. But it means the data I'm looking at could be out of date. And the data I'm adding isn't right there for others to consume.. they have to wait for me to sync'.

Check out Amazon's AWS and their SDK for Android. Highly recommended.

I assume that you know Java and my solution would be GWT/GAE ,since you asked for web application,GWT https://developers.google.com/web-toolkit/ would be perfect way and also you could use Google AppEngine Store as Cloud service and also you can integrate GWT with Phonegap to run it in Android.

Related

Is there a way to deploy backend (Kotlin) server application to Firebase?

I have already written a backend server application, which executes rather complicated tasks in Kotlin and it is running fine on my local machine.
I looked into Firebase and found out that you could host your website and create your database. My server application is basically a database, plus everything to handle it. I think that it should be possible to write the same database with Firebase's database too, but I think that that would require quite some time and I would need to learn how to access the database from Android and also understand how the Firebase database works and how to implement my functionality.
Concluding
My question basically is, if it is possible to deploy my already written app to Firebase and access it like before. Maybe through the website hosting and a link to my Kotlin app. I could not really find any information on how to do something like this.
TLDR; No, this is not possible with Firebase, however there are alternatives.
Firebase is a Backend as a Service, this means, that they basically provide most functionality for you. The Database can be directly accessed from the client application (an android app for example), or a third party server. The website hosting is static, meaning you can't perform server side code, and instead only serve your pre-built Html/Css/Javascript.
They have recently introduced Cloud functions, which are basically small functions executed on their servers, which could fulfill your purpose, however those are currently only available in javascript, and probably have a vastly different architecture from your existing backend, due to their nature of being small functions.
If you don't want to rewrite everything to work with Firebase, I'd recommend going with a service like Heroku, which is a Platform as a Service. This means that you can deploy your existing Kotlin backend to Heroku, and use that as the backend for your app.

How to set up a server for android app?

I am trying to create an android application in which an user will pretty save some data in database-like user data, photos and also be able to retrieve.
But I am clueless how to set up a server, connect to some database etc.
Can somebody help me point to right resources for end-to-end installation of server, database, and its interaction with the android application
Just set up a basic server that works over HTTP, and use HTTP libraries for android to make requests and handle results in the device. There are plenty of technologies with which you could make the server, just google building REST API with PHP/.net/java (whichever language you are comfortable with).
If you are mobile app developer and want to create server-client app then better use any back-end service rather than implementing new by own. Some most advanced and simple to use services are Parse and Firebase , BaasBox also there are many more.
And the plus point is this services free of cost until you have very large users.

How do most android applications retrieve data from a database server?

I am currently working on an application which is a small applications for businesses to list their promotions on my website. I have created this in ASP.NET and I'm using a REST-like interface for my website in the back-end. I'd like to now also introduce an android application. I've noticed there are things like windows azure mobile services out there which let you easily create and integrate data services to mobile applications. My question is should I use the same interface as my website or is there a conversion people use in the commercial space.
Thanks for your help :)
I do not have any experience with windows azure mobile services but I have many experience in writing APIs for different front ends (mobile/win/web/widgets) and never heart about any conventions/conversions in commercial space.
My advice is. If you need to push data to mobile application use some service that can do it or write yours. If you are going to write push notifications service you will need server to run it.
If the application will only pull data from server or push to it than better use same REST-like interface you already have. It can to avoid code duplication and will create some data exchange standard between you front ends and back end.
Hope it will help you.

Online Storage Android App

I am to build an android app that needs a central cloud storage (along with some server coding). My app is somewhat in the footsteps of
https://play.google.com/store/apps/details?id=com.justyo
I mean i should be able to store a login and registration (possibly FB login in the future too). Then, i will also have to maintain and fetch users' 'friends' in the app along with a status (that can be changed any time by the friends).
I am not new with android dev. I also know ample amount of web development. However, i don't know the approach to this kind of an app that is to use some server side code and online db for android.
I have search a lot on the internet and have found a bunch of stuff, but i am just not getting the confidence as to which approach is what i need here.
Is there something pre-built and given by Google themselves?
Do i have to by a domain, deploy a hidden (UI-less) web service and access it through the android app?
is there a free option out there by google?
Is there a sample demonstration android app out there?
I don't need the code or anything. I am just confused; afraid of starting off in the wrong direction. Please answer so it is easy to understand.
Thank you in advance :)
There is the Google Cloud Platform, specifically App Engine. You can read the Docs here.
You dont't need to register a domain to use the platform. Yes, you will need to deploy a (not necessary UI-less) web service to the cloud, accessed from the Android client through endpoints. Additionally, the service is free up to certain limits.
Sample apps are available for deployment once you create a project from here.

Syncing SQLite table over devices

Is it possible that I store my SQLite table over a dropbox account and have all my users sync their tables with the stored table? Also be able to make changes to that table?
Your approach could work in theory, but there are so many issues involved, that you're better off not doing it. If you wish to store and make data available across all devices belonging to a user, I strongly recommend looking into Datastore API by Dropbox. The API will take care of storing data locally as well as synchronize it over connected Dropbox accounts.
If you want a bit modular approach, you can use Windows Azure Mobile Services. These give you REST APIs to store your data in cloud. However, synchronization has to be handled by the developer - you. I have written a small library to do that here: http://bit.ly/ProjectMirror It's for Windows Phone, but Android version is already in a sister repo there. You could extend it. Let us know how that goes.
In addition to these services, Parse SDK is a good option. It requires you to pay after a while, though. In addition to what you want to do, it also provides other things like user management and so on. But, be aware that some of those operations may require you a live Internet connection.
So, in essence, if you want seamless data storage and sync, use Datastore. Be aware that you'll have no control over the server side. Also, your data will be restricted to the Dropbox ecosystem forever. If you plan on further expanding your app to other platforms, go with Azure and handle the sync. If you want lots of features, go with the Parse.
I would suggest looking into Google Play Game Services using the Cloud Save feature. Even if you are not building a game this feature lets you sync sqlite data in the cloud and Google will handle most of the work for you.
OR you could use a cloud based database which supports both push and pull. That means:
Scenario 1:
Your users change something on their phones. Changes are uploaded to the database. The database then pushes these changes to all other users.
Scenario 2:
Your users change something and upload this to the database. But instead of the cloud based server pushing the changes to all users, the users phones can ask the database for new data at intervals.
All this is very easy to set up. It took me about five, ten minutes. Just follow this easy tutorial:
https://parse.com/docs/android_guide
and for push:
https://parse.com/tutorials/android-push-notifications
We now use this for our company app, storing statistics for example.
Bear in mind that syncing can become complex. Try to keep it very simple, especially if you are new at programming.

Categories

Resources