Example #1
0
    public void getLineArrival() {
      prHandl.sendEmptyMessage(10);
      try {

        arrivalString = OasthHttp.getLineArrival(selLineid, selDirection, busStopsId[position]);
        prHandl.sendEmptyMessage(50);

        arrivalString =
            OasthArrivalParser.parseS(
                arrivalString,
                OasthArrivalParser.patternDesktopLineArrival,
                OasthArrivalParser.replacementLineArrival);

        prHandl.sendEmptyMessage(100);

      } catch (IOException e) {
        android.util.Log.e("getLineArrival Exception", e.getMessage());
      }
    }
Example #2
0
    public void getLinesArrival() {
      long startTime0 = System.currentTimeMillis();
      prHandl.sendEmptyMessage(10);
      try {

        arrivalString = OasthHttp.getLinesArrival(selLineid, selDirection, busStopsId[position]);
        prHandl.sendEmptyMessage(50);

        arrivalString =
            OasthArrivalParser.parseS(
                arrivalString,
                OasthArrivalParser.patternDesktopLinesArrival,
                OasthArrivalParser.replacementDesktopLinesArrival);

        long endTime0 = System.currentTimeMillis();
        Log.d(TAG, "Lines spent to donwload:" + (endTime0 - startTime0));

        prHandl.sendEmptyMessage(100);
      } catch (IOException e) {
        android.util.Log.e("getLinesArrival Exception", e.getMessage());
      }
    }