0. Register a key from MTA. Pretty fast and easy!
1. Download the google file named protobuf-2.5.0rc1 2 and import to your eclipse workspace src folder
import com.google.protobuf.ByteString;
import com.google.transit.realtime.GtfsRealtime;
import com.google.transit.realtime.GtfsRealtime.FeedMessage;
2. Add following code to get each entity where the times is in it.
String url = "http://datamine.mta.info/mta_esi.php?key=xxx";
new DownloadGtfs().execute(url);
...
{
Log.d("Gtfs EntityId:", entity.getId());
}
No comments:
Post a Comment