aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-15 21:33:50 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-15 21:33:50 +0200
commit219b102fac2d8417426e70c07ba43d3a5ff86821 (patch)
treed2fd45cd6706925562419339e2a8c0f65dc67fa0 /main/src/cgeo/geocaching/Geocache.java
parent6535af196ff80978f144d786e02fc34c9d58b9f5 (diff)
downloadcgeo-219b102fac2d8417426e70c07ba43d3a5ff86821.zip
cgeo-219b102fac2d8417426e70c07ba43d3a5ff86821.tar.gz
cgeo-219b102fac2d8417426e70c07ba43d3a5ff86821.tar.bz2
In Popup Menus the share item does not always have actionProvider, check for an actionprovider in the menu handler (fixes #3996)
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 14a1313..f3ff487 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -713,6 +713,15 @@ public class Geocache implements ICache, IWaypoint {
return getConnector() instanceof ISearchByCenter;
}
+ public void shareCache(final Activity fromActivity, final Resources res) {
+ if (geocode == null) {
+ return;
+ }
+
+ final Intent intent = getShareIntent();
+
+ fromActivity.startActivity(Intent.createChooser(intent, res.getText(R.string.cache_menu_share)));
+ }
public Intent getShareIntent() {
final StringBuilder subject = new StringBuilder("Geocache ");
subject.append(geocode);