android icon indicating copy to clipboard operation
android copied to clipboard

Research: open calendar/contact directly from unified search

Open tobiasKaminsky opened this issue 4 years ago • 3 comments
trafficstars

Is it possible to open a calendar/contact from unified search local on device?

Idea

  • there must be an unique id
  • "just" open this via intent on Android
    • either it works
    • or it fails with correct error message

Ref: https://itnext.io/android-calendar-intent-8536232ecb38

tobiasKaminsky avatar Nov 09 '21 08:11 tobiasKaminsky

@miaulalala as you are an expert on calendar. Do we have a unique id, which unified search could send, and Android then can use to view this event?

tobiasKaminsky avatar Feb 13 '24 07:02 tobiasKaminsky

Android:

  • Open calendar via intent: https://developer.android.com/guide/topics/providers/calendar-provider#intent-view
  • Open contact via intent: https://stackoverflow.com/questions/40092716/how-to-open-contact-using-intent-in-android

iOS:

  • open contact: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AddressBook/Tasks/URLScheme.html
  • open calendar: https://stackoverflow.com/questions/29684423/open-calendar-from-swift-app

tobiasKaminsky avatar Feb 13 '24 07:02 tobiasKaminsky

yes, calendar events / vcards have a unique id (UID):

See for example in the widgets: https://github.com/nextcloud/calendar/blob/babc444245f6e6cef2fd1a88773532074c9cad0e/lib/Dashboard/CalendarWidget.php#L176

miaulalala avatar Feb 13 '24 08:02 miaulalala