aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index fdfdbb5..db36740 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -707,6 +707,12 @@ public class Geocache implements ICache, IWaypoint {
return;
}
+ final Intent intent = getIntent();
+
+ fromActivity.startActivity(Intent.createChooser(intent, res.getText(R.string.action_bar_share_title)));
+ }
+
+ public Intent getIntent() {
final StringBuilder subject = new StringBuilder("Geocache ");
subject.append(geocode);
if (StringUtils.isNotBlank(name)) {
@@ -718,7 +724,7 @@ public class Geocache implements ICache, IWaypoint {
intent.putExtra(Intent.EXTRA_SUBJECT, subject.toString());
intent.putExtra(Intent.EXTRA_TEXT, getUrl());
- fromActivity.startActivity(Intent.createChooser(intent, res.getText(R.string.action_bar_share_title)));
+ return intent;
}
public String getUrl() {