How can I connect the between web application with an application? - android

1) I have a web application. This web app is for a user to buy a point.
2) I have an android application for parking payment. Payment is based on point that user buy from the admin. Since I made two things which are web app for admin and android app for user, so I will have two database for each one right?
3) So, how can I transfer the point that user buy from the admin to an android application? Is this thing has to do with JSON fetch or pass data?
4) Basically I want the user to get the point from the web application? Your answer will be really helpful to me, thank you :)

The issue is design issue. Your mobile app and the web app don’t have to be two separate.
You can have one application with one database that both web and mobile point to.
If you’re using Android look into ionic framework that can help you code one codebase targeting both web and mobile.
See
https://ionicframework.com
https://scotch.io/tutorials/create-your-first-mobile-app-with-angularjs-and-ionic

You will have to build a single server for both your admin and your app. Both will have a single database that is controlled by your server. Your app will request the same server to redeem points and your admin will request the server to add points. You can use retrofit library in android for making api calls to your server

The web application and the android application must connect to the same database on the server. In the android application, to you get the data via json, you must use asynctask to download the server information or use libraries like Retrofit or volley that facilitate the handling of json.

Related

How to Save android app user data to server

Currently I am working on one android app which takes user's info and let them register for the app.
But I am having problem while connecting my backend with my app.
In order to save the data I use server host which I don't know how to implement for android users.
Help me with this so that I can start building my apps..
If you are sending basic user info, maybe you can publish a rest webservice on the server and consume it from android app. im using retrofit right now to consume rest webservices from android and is very easy to use.

How to get Info from a Web app database into your Android and iOS app

Say I have a rails webapp and I want to make a mobile app version of it; how would I get information from the webapp active record database and implement it in the Android app? And how would I post information to the web server so that I be added to the database.
Let me know if I am not clear enough.
Thank you.
I am sure there are different ways to do it but it is common for mobile apps to consume apis through json.

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.

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?
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.

Access Heroku database from Android application

I've built a Rails 4 web application with PostgreSQL database and hosted it on Heroku. The future plan for that database is to also be used by one Android application.
I am not completely sure how can I accomplish that. Do I need to build another REST application and host it on Heroku and somehow connect to the same database or there is another way?
How to connect with Android application to that database which is used by the web site? I know I can't connect directly.
Thank you for your guidance.
You don't need another app - just build an API for current one and then you can communicate from Android app to your web application (web app will connect to db and return data).
Have a look at Twitter API as example - you can access different resources and manage them via Twitter API
https://dev.twitter.com/docs/api/1.1
You can build something similar - create rails controllers that access your database and respond with structure you want - preferably JSON format of your models (or something custom if you need)
From Android app you can send request to your API and parse JSON responses - then process data your own way on Android app.
Don't forget about authentication between your Android app and web application - let only your Android app to use it.
I encourage you to browse internet for best practices 'How to create an API' :)

Categories

Resources