Retrieving data from a website with JavaScript and XML

Discussion in 'Android Hacks and Help' started by jcscott, Dec 24, 2009.

  1. jcscott
    Offline

    jcscott New Member

    Joined:
    Nov 26, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Since I'm on break, I'm thinking about developing a bus finder for my college. However, I haven't had JavaScript in a long time. On top of that, I have no XML experience.
    The main feature of the application should allow user input of the bus stop number (like you can on the university website already) and then the output will consist of which bus and waiting times for each (which is also on the university website).
    My idea was to somehow read the information from the website and just present it in the Android application. But as I mentioned before, I have no clue how to do that.
    Could someone give me some advice or point me in the correct direction?

    An example is if my Stop number is 11782. The page that website generates is as such: Platform Estimated Time
  2. Rizza
    Offline

    Rizza New Member

    Joined:
    Dec 24, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
  3. jcscott
    Offline

    jcscott New Member

    Joined:
    Nov 26, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thanks again Rizza. I'm making good progress on my code now. I just have to do the GUI basically now. Which I can learn in a day or two.
  4. areeda
    Offline

    areeda New Member

    Joined:
    Dec 27, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I'm new to smartphones and Droid is my first, so I'm looking more for the discussion.


    It seems to me this function would be better done with a mobile friendly page on a web server than a stand alone app on the phone. Even if you don't have programming access to the school's web server, it seems easier to do it with another server. I believe we can even get the phones GPS location from a webserver (if that option is enabled). Then you could find the nearest few stops.


    Why do you prefer a phone application? I am asking not suggesting you're wrong.

    Joe
  5. travis134
    Offline

    travis134 New Member

    Joined:
    Dec 23, 2009
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    To support the Android Market... and possibly to make a bit of $$ too, I assume; hehehe.
  6. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    In most cases if someone went to the trouble of making a site that contains real-time updated/update-able information, they generally provide some sort of web service access layer (i.e SOAP or WSDL).

    You could start by talking to the person in charge of maintaining the site to see if there are any publicly available web services. There is a pretty good chance that they do, then you could just write a app/widget to make a web services call, consume the response and output it as something meaningful. This would be the simplest way that I could think of approaching this. Obviously you would want to provide a UI for options like polling interval, bus stop number, etc.

    Hope this helps.
Search tags for this page
bus stop location data lta useing java
,
get data from a website javascript
,
how to get data from a web page to an android application
,
how to get web data from website using javascript
,
how to retrieve data from website javascript
,
javascript get data from other website
,

javascript get data from website

,
javascript get info from other sites
,
javascript xml from website
,
read data from web site javascript
,
read the data from website using javascript
,
retriving spacific information from web in android