Search code examples
androidjsonasp.net-mvc-4mobileadk

json with android mobile application


Hi guys so I am new to android development or any mobile device development.

So I am working on a project that consists of two application. One with ASP.NET MVC4, one with Android.

what it is doing right now, Android device is accessing database server of ASP.Net application and saves data. This is able because currently, android app has database access information in the codes(db login info).

Since method above is extremely stupid I need help.

So what I am looking into is to use JSON(if possible). ASP.NET MVC4 application is already JSON ready, and i've made sandbox application that brings information from web app to android app. BUT my question here is is it possible to do same thing the other way around. Is it possible to make android application to make JSON and web application to access that application? I dont think this is possible.

So how do other REAL mobile applications save users data on their database server without including db access information within the code?


Solution

  • This is usually done through web api - have a look at twitters api as an example https://dev.twitter.com/docs/api/1.1

    You would have to pass data to the server using the api, just as you would use an api to get data from the server.