aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/TrackableActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/TrackableActivity.java')
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 7dfc3c1..9907060 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -111,6 +111,16 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
if (waitDialog != null) {
waitDialog.dismiss();
}
+
+ // if we have a newer Android device setup Android Beam for easy cache sharing
+ initializeAndroidBeam(
+ new ActivitySharingInterface() {
+ @Override
+ public String getUri() {
+ return trackable.getCgeoUrl();
+ }
+ }
+ );
}
};
@@ -241,7 +251,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
LogTrackableActivity.startActivity(this, trackable);
return true;
case R.id.menu_browser_trackable:
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(trackable.getUrl())));
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(trackable.getBrowserUrl())));
return true;
default:
return false;
@@ -252,7 +262,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
public boolean onPrepareOptionsMenu(Menu menu) {
if (trackable != null) {
menu.findItem(R.id.menu_log_touch).setEnabled(StringUtils.isNotBlank(geocode) && trackable.isLoggable());
- menu.findItem(R.id.menu_browser_trackable).setEnabled(StringUtils.isNotBlank(trackable.getUrl()));
+ menu.findItem(R.id.menu_browser_trackable).setEnabled(StringUtils.isNotBlank(trackable.getBrowserUrl()));
}
return super.onPrepareOptionsMenu(menu);
}