Beispiel #1
0
  /** starts the basic AR view */
  private void startARViewBasic() {

    // Create the basic intent
    if (wikitudeIntent == null) wikitudeIntent = prepareIntent();

    // And launch the intent
    try {
      GeoQuestApp.showMessage(getText(R.string.startingARView));
      wikitudeIntent.startIntent(this);
    } catch (ActivityNotFoundException e) {
      AbstractWikitudeARIntent.handleWikitudeNotFound(this);
    }
  }
Beispiel #2
0
  /**
   * adds hard-coded POIs to the intent
   *
   * @param intent the intent
   */
  private void addPois(WikitudeARIntent intent) {
    List<WikitudePOI> pois = new ArrayList<WikitudePOI>();
    WikitudePOI poi;

    for (Entry<String, HotspotOld> hotspotEntry : HotspotOld.getAllHotspots()) {
      HotspotOld curHotspot = hotspotEntry.getValue();
      GeoPoint gp = curHotspot.getPosition();
      double latitude = (double) (gp.getLatitudeE6()) / 1E6;
      double longitude = (double) (gp.getLongitudeE6()) / 1E6;

      String name = curHotspot.getName();
      String description = curHotspot.getDescription();
      // String iconRessource = curHotspot.getIconRessource();

      poi = new WikitudePOI(latitude, longitude, 0.0d, name, description);
      pois.add(poi);
    }
    intent.addPOIs(pois);
  }