Fix an error and add a new method in the ShareUtils class
Fix the error due to the rebase on the dev branch of this branch Add a shareText method in the ShareUtils class which has 3 parameters and calls the original shareText method with an empty string for the imagePreviewUrl param.
This commit is contained in:
parent
da4d379b22
commit
f02df6d80c
3 changed files with 20 additions and 2 deletions
|
|
@ -259,6 +259,23 @@ public final class ShareUtils {
|
|||
openAppChooser(context, shareIntent, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the android share sheet to share a content.
|
||||
*
|
||||
* For Android 10+ users, a content preview is shown, which includes the title of the shared
|
||||
* content.
|
||||
* <p>
|
||||
* This calls {@link #shareText(Context, String, String, String)} with an empty string for the
|
||||
* imagePreviewUrl parameter.
|
||||
*
|
||||
* @param context the context to use
|
||||
* @param title the title of the content
|
||||
* @param content the content to share
|
||||
*/
|
||||
public static void shareText(final Context context, final String title, final String content) {
|
||||
shareText(context, title, content, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the text to clipboard, and indicate to the user whether the operation was completed
|
||||
* successfully using a Toast.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue