getting json data from web and list them in android - android

i am developing an android app which can stream / download media from a web server, the first thing i am about to do is getting media on server to be viewed in a list just like Youtube, my problem is that i am inexperienced with Json i saw other posts here about that topic but didn't get me anywhere.
where can i start for simple json toturials to simulate my problem? and i heard about Android Volley for such things in android? how useful is it and shall i work with or without it for now?

These links may help you to build concept of JSON
You must google rather than asking
in java there is JSONObject, JSONArray, and others to use with it
http://www.json.com/
http://www.w3schools.com/json/
http://www.json.org/

Related

creating a 3 day BBC Android weather app

I'm bit of a basic programmer so forgive me if this sounds super basic and easy. I have been tasked to create a 3 day weather app by only using the BBC RSS feed, shown in the link here (this is a manchester RSS feed, i can probably add more feeds if i can).
http://open.live.bbc.co.uk/weather/feeds/en/2643123/3dayforecast.rss
i have only seen ones with yahoo, i don't know if it is similar to the BBC RSS feed. Also many of them contain something called 'JSON' which i have no idea if it can help me or hurts me if i follow the tutorials from that.
Thanks if anyone can help me.
I'm not sure what your actual question is, but JSON is a standard format for transferring objects between programs. It is explained well in this stack overflow post. A good library to handle JSON in Java is org.json. In the future, try to come up with a specific issue to ask a question about, not a general problem.
There are different ways to accomplish this, but one basic method is:
Create an AsyncTask to access the weather data feed without blocking the main thread.
In the doInBackground() method of the AsyncTask, connect to the JSON file via an HttpUrlConnection and get the InputStream.
Create a JsonReader to access the required data from your InputStream.
In the onPostExecute() method of the AsyncTask, update your UI with the data.
If you change the extension of your URL to '.json', you will be able to access the JSON version of this file.
You could also parse the XML (.rss extension) version of the file.
Ultimately these are fundamental concepts in Android development so you will have to do some more research.

JSON and a .rss file

I'm pretty new to android development and I was wondering if I could get some input on what to do in my case. I'm trying to make a list of events that are going on at my school using the calendar that's on its website. The problem is, the only way I found to get to the JSON format is through the .rss which looks like this link
I put it into myjson and got this error message and I have no idea what it means:
Parse error on line 1:
My goal is to be able to use JSON to create a list in a ListView on the app I'm making, but so far I'm completely lost as far as what to do. Any help is appreciated!
JSON is entirely different from RSS.
Look into this tutorial here or check out github, there's a ton of libraries that support RSS parsing such as this or this

Storing Data on and accessing data from a website

This is a total noob question. Sorry in advance if it is vague, but I'm looking for advice on how to start out. I have an app that I've developed that interacts with a local sqlite3 database. Everything works great, insofar as the data is local. Now, I want to move this data away from the local device and onto my website so that the app has to call out to that URL to get/set this data.
What topics should I be looking into? I need to understand how to 1) house this data on my website, and 2) modify my app to interact with it. Again, sorry if this is vague - just looking for topics to begin my search.
Thanks!
EDIT: I'm finding lots of resources out there that describe how to retrieve data FROM the site. What I am really spinning my wheels on is how to modify data stored on a site. This is back end data. No one will ever see it directly. JSON format sounds like the way to go, but I don't know where to look for ideas of how to update this data after a user initiates a change from the app. I need to update the data on the site, not just on the local database. Thanks again!
JSON JSON JSON! JSON is awesome, and is IMO the easiest way to communicate between the web and any other platform. You can look here and here for more info on the android side. Depending on what platform you are using for your website, there are many awesome libraries to help export your info to JSON. Happy Coding!
Check out the Volley library as it will simplify and speed up greatly your network communications (get it here).
You probably want to use JSON to retrieve and send data to your web-service as it is very light and compact.
An example using Volley and JSON

How to parse a html in android?

i am new to android and wanted to read data from a url .
MY aim is to parse a one single page of a particular website and store it locally.
i have heared json can be used for this purpose but i am unable to find a suitable article that explains how to read using it.
It would be really helpful if somebody posts a beginner introduction of parsing a web-page in android be it with json or any other technology.
i am programming android in Eclipse IDE
Check out this article: Registering via Intentfilter. It illustrates how to get html source from a webpage and display it to the user. Developed in Eclipse.

Read HTML file from Website and convert into App

I am looking into developing an App that will convert a website into more readable data for an android app. I am at university and have an online notice board which can be viewed on the web but if possible I would like to transfer this into an app on android to make it more easy to read on mobile devices.
What I thinking is that the app would go to the website where the notice board is held and read in the html code to display each notice in a list adapter view. Each notice is within its own div so I assume I could use that to split each notice up into its own button on the list adapter view. Is this possible and if so how I can go about doing this. I have tried google for an answer but I have not yet found a solution to this problem.
Thanks for your help
It seems overly complicated to me. I wouldn't handle all that using Android. I'd crawl the data on a machine (server) and then I'd convert all needed data to JSON and have the Android (client) fetch the data using a simple JSON parser.
In my opinion that would be the easiest solution if you don't have access to the server the website is hosted on to get it generate a JSON feed for you directly.
EDIT: In answer to your comment Boardy.
Here is the official website of the JSON project in order to get an understanding of what it is. Then if you have access to the webserver providing that page (I assume it is a PHP based site) and want to modify or add the functionality of providing a JSON feed then you should also take a look at the PHP JSON documentation.
To parse JSON on Android check out this SO question and also don't forget to take a look at the official Android documentation on their JSON implementation.

Categories

Resources