public static void showLogPostedSnackbar(@NonNull final Activity activity, @Nullable final Intent data, final View anchor) {
        if (data == null) {
            return;
        }
        final String shareText = data.getStringExtra("EXTRA_SHARE_TEXT");
        if (!StringUtils.isBlank(shareText)) {
            Snackbar.make(activity.findViewById(android.R.id.content), activity.getString(R.string.info_log_posted), Snackbar.LENGTH_LONG)
                    .setAnchorView(anchor)
                    .setAction(R.string.snackbar_action_share, v -> {
                        final Intent shareIntent = new Intent(Intent.ACTION_SEND);
                        shareIntent.setType("text/plain");
                        shareIntent.putExtra(Intent.EXTRA_TEXT, shareText);
                        activity.startActivity(Intent.createChooser(shareIntent, null));
                    })
                    .show();
        }
    }
Don't call this method, if you don't know whether Chrome is installed
main/src/main/java/cgeo/geocaching/utils/ShareUtils.java