Share #704

Merged
akinwale merged 3 commits from share into master 2019-10-11 18:22:40 +02:00
2 changed files with 14 additions and 2 deletions

2
app

@ -1 +1 @@
Subproject commit 79c02825d187844d759514117c664f9426c641ca
Subproject commit c85581b98f5d5a06257473c3c86d56d6197e3d43

View file

@ -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);