4

I have developed an offline data entry app in android where the user enters all the details which will be saved in sqlite db.

At the end of the day I want to transfer data from the sqlite db to a server which stores the data in PostgreSQL db. I didn't find any good answer as per my requirement.

Toon Krijthe
  • 51,960
  • 37
  • 141
  • 201
sitanshu
  • 67
  • 1
  • 3
  • 9

1 Answers1

6

You can use web services to send data to server.

The approach you may need to choose will be, have a service hosted on your server (could be written in any programming language) which retrieves/posts data from database and sends data in either JSON/XML format ( I did JSon format) to app. In your app use HTTPClient to get/post data to service hosted on your server. Parse the data using Android in built JSon API.

How to consume web service in android refer following links :

Android (Java) Simple Send and receive with Server - Fast Setup Challenge

Send data from android to webserver

Send data from android to server via JSON

Android Utility to send sqlite db to server

Community
  • 1
  • 1
Shruti
  • 8,785
  • 12
  • 54
  • 93