diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/event/EventDetailsDialog.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/event/EventDetailsDialog.kt index b689611d..3d0da8bc 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/event/EventDetailsDialog.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/event/EventDetailsDialog.kt @@ -4,6 +4,7 @@ package pl.szczodrzynski.edziennik.ui.dialogs.event +import android.content.ActivityNotFoundException import android.content.Intent import android.provider.CalendarContract import android.provider.CalendarContract.Events @@ -209,6 +210,10 @@ class EventDetailsDialog( } } - activity.startActivity(intent) + try { + activity.startActivity(intent) + } catch (e: ActivityNotFoundException) { + Toast.makeText(activity, R.string.calendar_app_not_found, Toast.LENGTH_SHORT).show() + } }} } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e3783e30..e0150396 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1160,4 +1160,5 @@ Synchronizuj Dzień wolny Konfigurowanie natychmiastowych powiadomień... + Nie znaleziono aplikacji kalendarza