Is your feature request related to a problem? Please describe.
The device_calendar for now support almost environment, and I think that is possible todo it on Windows (start from Windows 10 and above)
Describe the solution you'd like
I am not Windows app developer, however, It might bellow is good solution for entry point when we implement in Windows App.
Flutter for now supported Windows App based Win32 with C++ codebase.
Flutter before has planned to support UWP, but after MS has deprecated UWP, they cancel this feature.
To get the Device Calendar on Windows, we need to use Windows.ApplicationModel.Appointments namespace, provided though API on UWP.
Though UWP has deprecated, we will continue to use Win32 combine with WinRT API to get Appointments/Calendar and implement the way to modify event in device. (I am not sure, but though my researching, that imposible)
On main entry point, we can include the Appointment namesapce though winrt
#include <windows.h>
#include <winrt/Windows.ApplicationModel.Appointments.h>
#include <winrt/Windows.Foundation.Collections.h>
using namespace winrt;
using namespace Windows::ApplicationModel::Appointments;
using namespace Windows::Foundation::Collections;
int main()
{
CoInitializeEx(nullptr, COINIT_MULTITHREADED);
RoInitialize(RO_INIT_MULTITHREADED);
// ...
}
Then, we can create AppointmentManager
auto activationFactory = get_activation_factory<AppointmentManager>();
auto appointmentManager = activationFactory.as<AppointmentManager>();
Then, we can get all device calendar with bellow methods.
auto appointmentStore = appointmentManager.RequestStoreAsync(AppointmentStoreAccessType::AllCalendarsReadOnly).get();
Is your feature request related to a problem? Please describe. The
device_calendar
for now support almost environment, and I think that is possible todo it on Windows (start from Windows 10 and above)Describe the solution you'd like I am not Windows app developer, however, It might bellow is good solution for entry point when we implement in Windows App.
Windows.ApplicationModel.Appointments
namespace, provided though API on UWP.On main entry point, we can include the Appointment namesapce though winrt
Then, we can create AppointmentManager
Then, we can get all device calendar with bellow methods.
That is just idea, not tested yet. Additionally, we can do more with that namespace. Reference https://github.com/TheAlmightyBob/Calendars/blob/master/Calendars/Calendars.Plugin.UWP/CalendarsImplementation.cs
Describe alternatives you've considered I am not expert in Windows, still investigate, but if someone know anything, we can contribute together.