Skip to content

v1.0-rc5

Compare
Choose a tag to compare
@thuytrinh thuytrinh released this 24 Feb 09:11
· 1061 commits to develop since this release
  • Fixed: Use info was previously sent as Map<String, String>. User info is now Map<String, Object>.
  • New APIs to retrieve dark icons: TransportModeUtils.getDarkIconUrlForModeInfo() and TransportModeUtils.getDarkIconUrlForTransportMode(). See this for samples.
  • TripKit's source code is now located at https://github.com/skedgo/tripkit-android/tree/master/trip-kit.
  • New APIs to get real time update for a trip: RealTimeTripUpdateReceiver. RealTimeTripUpdateReceiver has an implementation, PeriodicRealTimeTripUpdateReceiver, that gets real time update for display trip periodically. The usage is pretty straightforward as following:
private TripGroup tripGroup;
private RealTimeTripUpdateReceiver realTimeTripUpdateReceiver;

@Override public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  realTimeTripUpdateReceiver = PeriodicRealTimeTripUpdateReceiver.builder()
      .group(tripGroup)
      .initialDelay(10)
      .period(10)
      .timeUnit(TimeUnit.SECONDS)
      .build();
}

@Override public void onStart() {
  super.onStart();
  realTimeTripUpdateReceiver.startAsync()
      .subscribe(new Action1<TripGroup>() {
        @Override public void call(TripGroup group) {
          // TODO: Reshow display trip.
        }
      });
}

@Override public void onStop() {
  super.onStop();
  realTimeTripUpdateReceiver.stop();
}