diff --git a/app b/app index 79c0282..c85581b 160000 --- a/app +++ b/app @@ -1 +1 @@ -Subproject commit 79c02825d187844d759514117c664f9426c641ca +Subproject commit c85581b98f5d5a06257473c3c86d56d6197e3d43 diff --git a/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java b/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java index f6e46bd..09bf33f 100644 --- a/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java +++ b/src/main/java/io/lbry/browser/reactmodules/UtilityModule.java @@ -208,6 +208,18 @@ public class UtilityModule extends ReactContextBaseJavaModule { } } + @ReactMethod + public void shareUrl(String url) { + Intent shareIntent = new Intent(); + shareIntent.setAction(Intent.ACTION_SEND); + shareIntent.setType("text/plain"); + shareIntent.putExtra(Intent.EXTRA_TEXT, url); + + Intent shareUrlIntent = Intent.createChooser(shareIntent, "Share LBRY content"); + shareUrlIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(shareUrlIntent); + } + @ReactMethod public void showNotificationForContent(final String uri, String title, String publisher, final String thumbnail, boolean isPlayable) { final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); @@ -354,7 +366,7 @@ public class UtilityModule extends ReactContextBaseJavaModule { context.sendBroadcast(intent); } } - + @ReactMethod public void openDocumentPicker(String type) { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);