Moved the "geo:" fix to the 'right' place

git-svn-id: https://zxing.googlecode.com/svn/trunk@343 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2008-04-03 22:18:16 +00:00
parent 6f4417346c
commit 5f25bd00a3
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ final class ResultHandler extends Handler {
} else if (type.equals(ParsedReaderResultType.GEO)) { } else if (type.equals(ParsedReaderResultType.GEO)) {
GeoParsedResult geoResult = (GeoParsedResult) result; GeoParsedResult geoResult = (GeoParsedResult) result;
try { try {
ContentURI geoURI = new ContentURI("geo:" + geoResult.getGeoURI()); ContentURI geoURI = new ContentURI(geoResult.getGeoURI());
Log.v(TAG, "Created geo URI: " + geoURI.toString()); Log.v(TAG, "Created geo URI: " + geoURI.toString());
intent = new Intent(Intent.VIEW_ACTION, geoURI); intent = new Intent(Intent.VIEW_ACTION, geoURI);
} catch (URISyntaxException e) { } catch (URISyntaxException e) {

View file

@ -68,7 +68,7 @@ public final class GeoParsedResult extends ParsedReaderResult {
longitude = Float.parseFloat(rawText.substring(latitudeEnd + 1, longitudeEnd)); longitude = Float.parseFloat(rawText.substring(latitudeEnd + 1, longitudeEnd));
altitude = Float.parseFloat(rawText.substring(longitudeEnd + 1)); altitude = Float.parseFloat(rawText.substring(longitudeEnd + 1));
} }
return new GeoParsedResult(rawText, latitude, longitude, altitude); return new GeoParsedResult("geo:" + rawText, latitude, longitude, altitude);
} }
public String getGeoURI() { public String getGeoURI() {