I need your expertise to understand how an Android App can communicate with an existing website.
Using the same web interface but should be displayed as an Android app
Using the same database, when we try searching, and the result should be displayed with in the app
Using the same authentication, so if we accept username/password on our Android app, it should use an existing website script which can authenticate and whatever is returned should be displayed in the app.
Thanks
Well you can use webview for display of pages that should be optimized for best user experience on phone, you can query the database and show response on android - for that you need to build parser on webpage that can accept some sort of query and return response in for example json or xml format. The same goes for authentication, it is very simple actually
As per my knowledge, you need to access Web Services of Website to take the data back from the Website to the App.
Related
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.
I want to build a website, where the data will be saved in a data base, logical in a sql database. Also, I want to build an android app, which will take the data from the above (sql) data base. How can I achieve it? I mean how can I manage the communication between the website and the android app. In past, I have create website with php and sql and also I have build android apps, but now I want to achieve the communication between them. Can I use parse platform?
FYI, without any server communication you can't use the website database in android application.
If you want to manage the communication between the website and the android app means you need a centralized server which having the data of your web/mobile applications. So, after that by using the web service methods (REST/SOAP) you can achieve the communication between them.
yeah unfortunately chrome won't let webapps use local storage on android. what you can do is create a local server (using org.apache.http package for example), let it run as a background android service, then have the website make requests to that url. Its considered hacky, but it would work. You can post whatever data you wanted the website to know about , and then get it from the website.
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.
I was wondering how can you link the fields of a website with an app. Like I have a college attendance website where we all check our attendance and then a student made an app on android where we login by entering the student id and password. So how was the person able to send info from the app to the website and get the information?? Thanks in advance! The website is www.websismit.Manipal.edu.
See you there are some ways as follows:-
you can make an android app having single activity with webview and
open your site inside the webview. you can also use html 5 and jquery mobile for that.
you can make an native application and using web-services you can
get/set the parameter result.
In thin client mobile applications, we generally deal with lot of data exchange between server and mobile app. Mobile app is nothing but a client. So in order to get/post data from server you have to write APIs.
Now writing restful API is your choice you can use any on the available language.
I believe your website is up already so just search and you can easily get ways to expose RESTful APIs.
There are different ways to identify client request, for that you should use Access Token to identify the clientID/UserID or whatever id you are maintaining.
For consuming API from android, you can refer to this tutorial.
This is what I'm trying to do:
1. I have a tablet and I want to connect to the university's wi-fi to access internet
2. Connection to the internet won't work unless you open a browse
3. You are automatically redirected to a university username-password page
4. You type in your university credentials and boom => you have internet
Problem??? I hate to have to put my password every single day and although chrome for android can store it I still have to open a browser, etc. etc. etc.
Solution:
Use Selenium, WebDriver, HtmlUnit or some sort of headless browser to programmatically fill in the login form in the background.
Problem 2: These headless browsers don't work on Android (Or I haven't been able to make them work)
Does anyone know of a simple headless browser that works on Android devices, one that can fill a simple form and submit it? Are there other alternatives to what I want to do?
Thx in advance for the help.
Some related Questions: HttpUnit/HtmlUnit equivalent for android, Android: Fill Form Data and Extract HTML, Html Parsing in android
How does the University validate you once you've logged in? e.g. is it based on setting cookies in your web browser? What happens if you login with another web browser once you've authenticated in the first one?
Once you know how it authenticates you, you should be able to devise a suitable approach. For instance, if it's device-wide authentication e.g. based on your mac address then perhaps you can write a simple Android app that embeds a WebView, and/or plain old HTTP request / response programming in Java. If, however, it's browser based then you either need to login (automagically) with the browser you then want to use, or find a way to insert the relevant cookie(s) into the browser that you want to use for web browsing.