How can I sync over the internet in an Android app? - android

Writing my first Android app here...
A part of the app is syncing messages across all devices with the app. A stream of sorts.
I was thinking of adding each message to an SQLite database and then syncing that over Google App Engine. Would that work? Is there a better way? I've heard of XMPP as well, but I'd prefer avoiding paying for a server until necessary.

take a look at Google iosched app for some android best practices on data sync via cloud.
you probably need to consider offline scenario too, as this is common in mobile devices.
another option is to consider third party services like https://parse.com/, or https://www.firebase.com/

Related

Connecting iOS, Android, and Rails App to One Database

My friends and I are developing a rails app (ruby), iOS app (swift), and android app (java). We are trying to figure out the best way to connect them all.
From our current research, we are under the impression that an API will need to be created with rails and the mobile apps will then have to communicate with that. Is this the only solution? I am also understand that apps can "pull" data from an api, but what about the other way around? We would like each application to be congruent with each other... for example, a record is created in the iOS app. As soon as this happens, the record should also be able to found on the rails app.
When thinking about it, it seems like all we would need is one database, and then have all of the apps connected to it. Would something like this work?
Having trouble finding solid information regarding this. If you know of any documentation, please pass it my way.
The best way is to host database in cloud and access to that common database from all applications. If you host your database with any hosting provider, they will give you a connection string using which you can access from any application. See Amazon AWS for example.
As I understand it, the popular way to interface with your database would be to expose it through a REST framework. Doing this, it doesn't matter how many apps you want to be able to interact with the data, or what platform they are on.
Also, check out Kivy as an option for your mobile implementation, as it allows you to deploy to iOS and Android from a single code base. Of course, you may need to account for differences in hardware APIs, etc... But that would be easier, IMO, than maintaining multiple code bases.

which database should I use?

I am planning to build a web application and android app, which will manage huge numbers of notification (push notification), and can work in slow internet connection too. I need to send and get instant notifications. Number of users can be thousands or millions, application will have multiple servers (web farm), multiple database. Now I need to decide that which database will be best for this kind of application and which language should I use for programming. Please help me out. Any suggestions will be appreciated
Well, first you need to decide what your immediate needs are. Are you going to use this on a platforms that could potentially have hundreds of people accessing information at the same time? Then you need to estimate your future needs.
This will help you to decide your database system.
As per my experience i am suggesting you to use MYSQL database.
I Blindly Suggest you to Use Parse Cloud Database,as it provides SDK for All mobile Environments like Android and IOS for easy implementation and also it recently Launched a Javascript SDK to use.Its free for Trial.MultiPlatform Support and Secure
Check it out Here: https://www.parse.com/
Are you sure you going to get to thousands and millions users ? Everyone starts from scratch (read: zero users, except some friends). By this I mean, that you have to concentrate on what's the real issue within your development (growing app user base is different story):
Creation of Android app and it's lifecycle (updates, support of previous versions & etc).
Back-end. Will I also work on Back-end. Working on 2 'projects' (Android app and it's back-end) isn't easy. Not everyone is experienced enough to work on multiple assignments at the same time.
Valuate an option of using SaaS/Paas backend. Most of the have trial or free version for developer.
Third option is great. Get cheap/free web host. Store there configuration, that your Android app will download when it starts. In configuration you should declare what's the back-end and how to communicate with it. You can use any of known services like https://www.firebase.com or https://parse.com/plans or even use Google App engine free tier / AWS free tier.
About developing app for Android - if your app doesn't need any complex calculation or libraries - just write it with JavaScript. It's fast enough. Though, Java apps are always faster and easier to debug.
Good luck !

Architecture for cross platform messaging app

i am looking to build a mobile messaging app firstly in android and then ios later, and am struggling with the backend architecture and need some advice on what would be best in my circumstance. Basically i am used to just developing apps through a basic web server and using mysql with php, but now i think and want to create something that not only is very reliable and fast but is also scalable and can be used by both the android and ios platforms.
I am thinking about developing it on google cloud platform using either their google app engine or google compute engine depending on what other architectures i use. Also i was going to use google cloud messaging as my main way of handling the messages, however i am now not sure of that as it is only supported by apps that run on android and not ios, also i have heard it can be unreliable in some messages getting lost.
My main problem is that i have heard so many things about different architectures like ejabberd, xmpp, socket i.o and databases like redis that all work well with messaging apps, however i am not sure which to go that will work well together.
Sorry if this seems a bit of a confused situation, but i dont want to start developing something that i am later going to have to change. Thanks for the help
Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0:
https://developers.google.com/cloud-messaging/
https://www.youtube.com/watch?v=gJatfdattno
You are asking about many different things.
Storage: can be a mysql database or something like mongo db
Transport protocol: XMPP is a chat protocol with many chat features included but it is not supported in browsers. WebSocket is more low level and more general but works inside the browser
webserver software: you basically need access to the database and be able to transmit XMPP or WebSocket. I'd recommend node.js for this. PHP is more for web pages

Best deploy solution for "Restlet" based server side of an Android Project

I would like to ask you for an opinion about best free/paid server solution for the server side of android app. The server is written using "Restlet". I need application server with MySQL backend support (like "TomCat" & "MySql" on my local machine). I would like to upload the app on GooglePlay for free so i cant afford something expensive. The applicaiton is language learner and the transactions are mostly pushing and pooling words so i guess i dont need huge bandwidht and so on.. Thanks!
Google App Engine now supports MySQL, and you can write your backend in either Java, Go, or Python.
I have deployed Android apps that use App Engine for the backend. Even with 30,000 active users, I pay $2.10 per week.
You might be able to squeeze into the free tier, and not pay anything at all.

The simplest way to use C2DM?

It has been a couple of weeks and I am having so much trouble making C2DM work. I've read a million guides and watched video tutorials but have had no luck. I just need a way to communicate with my server and my phone in the simplest way. Any help?
If you're still interested in trying C2DM, try installing the Google Plugin for Eclipse and use it to generate the Android / App Engine sample project. It should be able to generate a skeleton project that is able to communicate between AppEngine and a basic Android application. You could verify that the sample works and use it as a basis to debug your custom application.
There was also a related AppEngine + Android session at Google I/O this year.
The easiest way to get push into your app is to use a third party push provider like Urban Airship or Xtify. Instead of writing the code to interface with google directly you integrate the third party SDK into your app and they handle the messy stuff.
Additionally, you don't have to worry about scaling if your app gets (or already is) big. And going cross-platform (iOS, Blackberry) is that much easier.

Categories

Resources