diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-04-24 20:08:52 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-05-18 21:56:43 +0200 |
commit | a0825983139c99a9799503cafdf0dd0e3ce54a2f (patch) | |
tree | b018b9f0c42add75593656f90648a319aa98a8db /main/src/cgeo/geocaching/Geocache.java | |
parent | 916992dc8398db364927a50a8ceb46f3053fce96 (diff) | |
download | cgeo-a0825983139c99a9799503cafdf0dd0e3ce54a2f.zip cgeo-a0825983139c99a9799503cafdf0dd0e3ce54a2f.tar.gz cgeo-a0825983139c99a9799503cafdf0dd0e3ce54a2f.tar.bz2 |
Implement Android Beam (NFC Sharing) for cgeo
To support direct opening of CGEO on the other device, introduce a distinction between getBrowserURL and getCgeoURL in providers.
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index db36740..21de4ac 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -501,7 +501,7 @@ public class Geocache implements ICache, IWaypoint { } private String getCacheUrl() { - return getConnector().getCacheUrl(this); + return getConnector().getCacheBrowserUrl(this); } private String getBrowserCacheUrl() { @@ -722,15 +722,17 @@ public class Geocache implements ICache, IWaypoint { final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, subject.toString()); - intent.putExtra(Intent.EXTRA_TEXT, getUrl()); + intent.putExtra(Intent.EXTRA_TEXT, getBrowserUrl()); return intent; } - public String getUrl() { - return getConnector().getCacheUrl(this); + public String getBrowserUrl() { + return getConnector().getCacheBrowserUrl(this); } + public String getCgeoUrl() { return getConnector().getCgeoCacheUrl(this); } + public boolean supportsGCVote() { return StringUtils.startsWithIgnoreCase(geocode, "GC"); } |