mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Show notification when file cannot be opened because no app is available
This commit is contained in:
parent
5bf0118bf7
commit
210b7b7ed0
@ -354,4 +354,5 @@
|
||||
<string name="plugin_photo_desc">Launch the camera app to ease taking and transferring pictures</string>
|
||||
|
||||
<string name="findmyphone_preference_key_ringtone" translatable="false">findmyphone_ringtone</string>
|
||||
<string name="no_app_for_opening">No suitable app found to open this file</string>
|
||||
</resources>
|
||||
|
@ -21,6 +21,7 @@
|
||||
package org.kde.kdeconnect.Plugins.SharePlugin;
|
||||
|
||||
import android.app.DownloadManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
@ -202,6 +203,10 @@ public class CompositeReceiveFileJob extends BackgroundJob<Device, Void> {
|
||||
shareNotification.show();
|
||||
}
|
||||
reportResult(null);
|
||||
|
||||
} catch (ActivityNotFoundException e) {
|
||||
shareNotification.setFinished(getDevice().getContext().getString(R.string.no_app_for_opening));
|
||||
shareNotification.show();
|
||||
} catch (Exception e) {
|
||||
isRunning = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user