The Tokenizer
The Tokenizer

Reputation: 1564

Running this GTFS sample code

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.

Upvotes: 7

Views: 2821

Answers (2)

cwhsu
cwhsu

Reputation: 1523

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

Upvotes: 2

Joshua Wooward
Joshua Wooward

Reputation: 1508

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.

Upvotes: 1

Related Questions