コード例 #1
0
  @Override
  public void requestSearch(Bundle bundle) {
    if (!bundle.containsKey(SearchManager.QUERY)
        && !bundle.containsKey(Extra.CATEGORY)
        && !bundle.containsKey(Extra.NODETYPE)
        && !bundle.containsKey(Extra.WHEELCHAIR_STATE)) {
      return;
    }

    if (bundle.getInt(Extra.CATEGORY) == Extra.UNKNOWN) {
      bundle.remove(Extra.CATEGORY);
    }

    if (!bundle.containsKey(Extra.WHAT)) {
      int what;
      if (bundle.containsKey(Extra.CATEGORY) || bundle.containsKey(Extra.NODETYPE)) {
        what = What.RETRIEVE_NODES;
      } else {
        what = What.SEARCH_NODES;
      }

      bundle.putInt(Extra.WHAT, what);
    }

    if (bundle.containsKey(Extra.DISTANCE_LIMIT)) {
      bundle.putParcelable(Extra.LOCATION, mLocation);
    }

    bundle.putParcelable(Extra.STATUS_RECEIVER, mReceiver);
    RestServiceHelper.executeRequest(WheelmapApp.getApp(), bundle);
  }
コード例 #2
0
 @Override
 public void requestUpdate(Bundle bundle) {
   Log.d(TAG, "requestUpdate mLocation = " + mLocation + " mDistance = " + mDistance);
   RestServiceHelper.retrieveNodesByDistance(getActivity(), mLocation, mDistance, mReceiver);
 }