Android OS and postgreSQL - android

We are undertaking an Android project but need to connect to postgreSQL server which we use throughout our other projects.
Any suggestions on a starting point for this?
Is there anything out there (paid or unpaid) that will allow us to achieve this?
I realize that this is a pretty general question, and although we have extensive experience with writing desktop client/server apps, we have little experience with programming for mobile devices.

I would write a RestFUL API or WebService to be used as front end for your Android device to connect to your PostgreSQL backend.
I don't think you will be able to connect directly your Android App to a PostgreSQL database.

I'd go with a lightweight REST interface that would talk to PostgreSQL in the backend. Have a look at Simple.

I would approach this by implementing an intermediary web service. The Android application would send requests to the web service, which would serve as a gatekeeper to isolate the PostgreSQL server from the internet at large.

Related

developing an android application with servlet

I'm currently developing an android application. My application allows users to choose a picture from a gallery, add a comment and send it to the server. The server then saves it in database.
Currently I'm using HttpUrlConnection at client side and Dynamic Web Project with a servlet to process on server (I'm using eclipse with Apache Tomcat)
So the questions are:
Is it a proper use of this technology to develop my app. (does it violate any rules? Sorry I'm a newbie)
Does this technology affect anything if i want to expand my app?
Are there any better technologies to use in this situation and is it worth to use it?
No I think it is a better way to develop this. I have also develop a chat based app usign the same technologies.
It doesn't violate any rules. There are many apps in the market usign the same technologies.
Q-3.Are there any better technologies to use in this situation and is it worth to use it?
You can also use php or any other server side scripting language to do the same.
Because when you want to host your java app you may find difficulty for java hosting but for php and asp you can easily find hosting services.
I answer in order:
1- the client is different, the client is recomended create an android application.
2-You need have clear this: Android is an application, the server has to attend petition from android. The conection could be using webservices, API rest, or others ways.
3-Android need Java to be native, in the server side you can use, Ruby, PHP, Java, Python or any server programming languaje side. Is your choice.

connecting to Android studio with a noSQL db like crouchDB

Has anyone here ever used a db like crouchDB to connect to an android application?
How do you connect to crouchDB using Android Studio?
I looked it up on google, but there was nothing there about this topic.
I am not familiar with couchDB but as far as I know, you need to connect to a server which connects to a database in order to fetch data for android application. PHP is the most popular server side language and I learnt node.js for android application. For node js, I found this example that teaches you how to connect nodejs to couchDB may help you. Also, you may try different framework with nodejs to facilitate your work, such as loopback. Loopback contains a connector to connect to couchDB but there would be quite a lot to learn since you have to learn loopback and nodejs but loopback automatically provides rest api and android sdk for you to output data effectively. For PHP, you may google one of many tutorial websites that fit your need. I personally never used couchDB before and I learnt how to connect android application to database from this tutorial.

Android service connection via JSON to MS SQL backend

I and a colleague of mine are making an Android app for a bachelor project, and are not aware of what we should use in order to connect an Android device to an MS SQL database. The possible options we have considered so far are either using MVC4, WCF or Web API. We are trying to send just a bunch of strings from the database to the Android device, but we do not have extensive knowledge about either of the fore-mentioned technologies and we are wondering what is the best way and how to go about it all. We are also not aiming at creating a webpage for the project, and thus we think that MVC might be an overkill.
Thank you and we are looking towards your thoughts about this!

iOS/Android Syncing with Delphi/C# Desktop Application

Not sure if this is the correct Stack Exchange website but here goes..
A client has asked me to look into the possibility of having a iOS or Android App for typing in information storing that in a SQLLite database and then syncing up with the main desktop application when plugged in by cable or something other syncing technology.
The desktop application is a Windows one written currently in Delphi 7.
Are there any API's to sync data from a SQLLite database on iOS/Android that Delphi can use?
If not, then would it be better if the desktop application was written in C# as its a newer language that can consume the API's easier?
For unidirectional sync (device to desktop), I would start with a simple web service (HTTP based). The new Web Sockets standard, also based on HTTP, is a little more complicated, but would allow for bidirectional communication.
The devices can HTTP POST database changes to the server, and the desktop client can pull new data (using HTTP GET) or receive push notifications, for example using a Web Sockets client.
For desktop to device you could also check out Apple Push Notifications and the corresponding Android technology.
For high availability I recommend a cloud-based solution like Amazon Elastic Compute Cloud (EC2), Google App Engine (GAE) or Azure.
This question is rather broad, there are many things you could do here. There aare so many technologies to use it's blinding.
The prevailing technique for transferring information from mobile devices is REST (over http).
You could also whip something up rather swiftly in node.js or WFC to create a service to collect information from the mobile devices.
I'm not sure about Delphi libraries available but perhaps by including REST in your search term you may have more luck. You may want to take a look at https://stackoverflow.com/questions/3959851/using-rest-with-delphi for a start.
The mobile side may be more tricky. If you are developing for multiple devices you may wish to explore the cross platform developer framework by PhoneGap as there seems to be a few projects that aim to sync local databases to the cloud. How you tie these together will be an interesting task.
Good luck!!!

Implementing sync from mobile app to server in .net

I'm planning a mobile app, to be built using phonegap, that will sync user data with a server. The data can be edited on the app or via a web interface on the server, and some users will have multiple devices so need to sync to them all.
Anyone know of good guidelines/tutorials/patterns for this sort of thing? I can hand-code it all but I'm sure I'll make lots of common mistakes and it'd be better to either use a library or follow some good rules.
If I was doing the server in java then something like OpenMobster sounds good.
have you checked out the Sync Framework Toolkit?
I am looking to do the same thing and have found https://github.com/orbitaloop/WebSqlSync/. I have not used it in anger yet, but it looks good.
Just so that there is no stone left unturned in your research.
To use OpenMobster your server does not have to be in Java. It helps if it is, but you can have your server in any language or platform. All you have to do is expose your data via a secure REST API.
You then write the OpenMobster Sync Channel that accesses data via this REST interface. Yes, this Sync Channel has to be written in Java as it plugs into the core Sync Engine.
So architecturally speaking, you would have the OpenMobster server between your server and the mobile device.
This is the same architecture when mobilizing legacy databases, CRM systems, ERP servers, SalesForce.com, etc
Full Disclosure: I am the Chief Engineer of OpenMobster project

Categories

Resources