Handle share errors

pull/209/head
M66B 2 years ago
parent 68ef9d3b53
commit 31a6c3bfd3

@ -845,8 +845,12 @@ public class Helper {
static void share(Context context, File file, String type, String name) { static void share(Context context, File file, String type, String name) {
// https://developer.android.com/reference/androidx/core/content/FileProvider // https://developer.android.com/reference/androidx/core/content/FileProvider
try {
Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file); Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file);
share(context, uri, type, name); share(context, uri, type, name);
} catch (Throwable ex) {
Log.e(ex);
}
} }
static void share(Context context, Uri uri, String type, String name) { static void share(Context context, Uri uri, String type, String name) {

Loading…
Cancel
Save