Best way to show updated results - android

Hey basicaly im developing an application for the rugby team i play for and need a way to display match results is there a way to update these easily within an application? or is it best to just use web view and link it to a html page i'd rather they didnt have to load a web page each time if at all possible but at the same time thats better than doing a full app update each week.
Thanks in advance
Ashley Waters

Use xml parsing, in your app and check on each launch of your app if your live xml is updated, otherwise save the data and keep showing that data on your app.

For that you have to create a web-service which throws/get request/response either in XML or JSON. While getting response you have to parse XML or JSON and display it inside the application.
If you want to update the application by making web call automatically then implement Background call and set timer for service so that it continuously check whether any data is updated at web or not.

Related

In android studio with java How to load web text as string from an activity for Android 6+ devices

From an Activity, How can I retrieve code or text from a website and display to the user ? I'm having difficulties programming back to Android, now developing as for Android 6.0 and newer. Getting deprecated about http client etc.. so I need a little of help.
Can you paste me some code example including "imports" in order to when the app load, from an Activity class, and also when a user click a "button1", to retrieve the text displayed from a web say "yahoo.es", and show a message to the user with the text from the web (loaded and parsed to a string) using Toast.
Help much appreciated in advance
Firstly you are way too ambiguous about your question. Correct me if i am wrong, what you basically want is to get data from internet and display them to user. Right.
If Yes, then the best way to do this is to get JSON response and parse it to display the relevant information onto the screen.
Take for example, you want an App displaying current Weather status of a city.Then to get the Weather data from Internet you need to connect to those websites which provide you that data.
Now one such website is OpenWeatherMap.org. You can use its APIs to retrieve data in JSON format and then display. You need to go through its API documentation.
This is link which will explain you the full process of connecting to an website's API, its retrieval of Data in Json format and ways to render and display them on screen effectively.
https://www.udacity.com/course/android-basics-networking--ud843
Hope it helps.

Android application getting information from a website

I want to write an app get the information from posts (mostly about new classes) on my university website then make some annoucement once there is new class.
I've google and see RSS mostly, but the page I want to get data does not use RSS. I read something about website using service so we can read XML in the app, but I don't know if the page using service or not. Last resort is using host (somee for example) and js to get text from the page, then the app could read data from the host.
That's all I have right now, but it's still unclear for me. Any suggestion about what to read, what should I use?? Much appreciation
I think the first thing you do should be to ask your uni if they provide any feed or webservice for these data that you could use.
If they don't, or don't answer at all, your last resort would be scraping. To do this, you can use an HTML parser, like jsoup, and then go through the HTML data, getting information as you need.
To see if there are been changes, you would just have to cache your current processed information, probably in a database, and compare the new one to the one currently saved.

How can I display whatever I need from website?

I have developed some company website in that i had careers option.now using text view i am displaying job openings,but when they update in website app also should get update and if they want to post in app only means how i update or post job opening after placing in google play store. please explain with code.
WebView webView = (WebView)findViewById(R.id.wv);
webView.loadUrl("http://www.emergtechinc.com/Careers/careers-cjo.aspx");
I used webview and displayed the currenopenings page. Is it right but I got whole website page. How can I display whatever I need from website?
If you want to load specific data only, I would suggest an API on the backend of your website. Create a specific Activity in you app that queries the API, which would return data for job postings, and display it in any manner you would like.
If you want users to post to the site from the application, you will also need an API to handle the post.
#Prerak's answer will work as well and be less code than the method I am suggesting.

How to edit Android Apps Content through Website ?

Is it possible to edit contents of an android app through web site? For example, contents in a page (videos, texts) & layouts (location, size, colours).
Yes it is possible using like Client and Server approach where your Android app works like Client and your Website is like Server.
You can first download a data and store that data into SQlite and whenever you open a application every time app request to Server asking for New data.
You an achieve this using Sync Date & Time. Like whenever a website update there data then change Date & Time and when your request New data will check Date & Time. If Date & Time change then your app show update data message or New data available message. In this way you can achieved.
I think its not possible directly but sounds like you are about to use wrong pattern. The right pattern is a client-server one, where android app is a client and website with REST or any other custom API is a server. Application should request data from server and display it in a way you set up. So you will edit any data on a server and your app will receive changes on request.
I am not sure what you are trying to do but with any UI field, you can code it programmatically. So for instance, you have a button and want to be able to change the text on it, you can technically do this via a website:
You will need some sort of database management system that will control the content of the app. The app will just have to call the database to get all the data/fields it needs. You will pretty much be making a content management system for your app.

Android JSON user registration

I'm in the process of building an Android application that interacts via a JSON API with my website. I've basically got everything together except for user registration on the app. I have an idea on how I want to implement it, but I want to see if there might be an easier way.
My approach is:
When the RegisterActivity is started, display a loading indicator, and make an asynchronous JSON request (via google-gson) to the server get all the fields needed for registration.
When the listener receives a response, populate the spinners, checkboxes, etc. with the possible registration field values.
Allow the user to complete the form and submit via JSON.
You're probably thinking, "Why don't you just store the possible registration spinner/checkbox values in the app itself?" The possible values for each field will be changing over time as I continue to test/push the product, and I don't want to break a build simply because I added/removed some possible options on the server. This is why I'm dynamically building the form based upon a JSON request.
Given that, I'm wondering:
Am I thinking about this the wrong way?
If this is a good approach, is there a JAR or sample implementation someone has out there that already accomplishes this?
You could always just use a WebView and have your registration page written in HTML and hosted on your server. That simplifies things dramatically.
http://developer.android.com/guide/webapps/webview.html

Categories

Resources