7

I am having trouble finding an API that will allow me to read in GTFS data. After much searching I was able to find and run This code, but there is not really much of an explanation. I am ultimately having trouble trying to figure out how to get information and display it in .xml layouts.

Question:

  1. Do I need to create another class with an onCreate method and call these other classes?
  2. Does this program not require me to load values into a database?
  3. Where can I find an API that would help me understand how to read in, parse, and display values.
Mat
  • 202,337
  • 40
  • 393
  • 406
The Tokenizer
  • 1,564
  • 3
  • 29
  • 46
  • 1
    So, you have GTFS files, and you have "android-gtfs" from Google code... but you don't know how to make them work together? – EGHDK Sep 16 '12 at 18:23
  • Exactly. I've been doing a lot of searching around, and this code is very close to what i need, but I am having trouble implementing it with a UI. – The Tokenizer Sep 16 '12 at 18:37

2 Answers2

2

There is nothing in the source of xml, manifest, not even MainActivity.java or any activity

so there is not much thing you could do besides using the class which you're totally

capable to do it yourself by reading spec.

Question:

 1. Do I need to create another class with an onCreate method and call
    these other classes? 

There is no activity, so no onCreate, no calling methods, nothing.

 2. Does this program not require me to load values
    into a database? 

Same as question one.

 3. Where can I find an API that would help me understand how to read in, parse, and
    display values.

You could really just implement this by following the spec all by yourself. It's really simple.

Anyway, I made an example for you so you could use git clone to get the source code and do

whatever you like. https://github.com/cwhsu1984/GtfsDemo.git

cwhsu
  • 1,493
  • 24
  • 31
1

Look at https://developers.google.com/transit/gtfs/ for more GTFS specs

That project was a piece of a project built in a class project that I wanted to open source. Other team members didn't believe the open source model as I did.

If I recall, what I did was make a sqlite DB of the GTFS data, and in a activity pull info from the DB.

I'm sorry, in frustration with the team, I pretty much deleted all the code I had ;)

Also, I haven't touched Android since, soo.... Sorry I can't help.

Joshua Wooward
  • 1,508
  • 2
  • 10
  • 12