public static void shareOrDismissDialog(final Activity context, @NonNull final Uri uri, @NonNull final String mimeType, @StringRes final int title, final String msg) {
        SimpleDialog.of(context).setTitle(title).setMessage(TextParam.text(msg))
                .setNeutralButton(TextParam.id(R.string.cache_share_field))
                .setNeutralAction(() -> {
                    final Intent intent = createShareIntentInternal(context, mimeType, null, msg, uri, null);
                    shareInternal(context, intent, title);
                })
                .show();
    }
Standard message box + additional share button for file sharing
main/src/main/java/cgeo/geocaching/utils/ShareUtils.java