Set reminder alarm when create Calendar event in Android MIUI

Please provide the following:

  1. SDK Version: ~48.0.18
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

this code is correct to excute, but when i open Calendar, i find my event alarm switch is ‘off’, so i want asking what should i set ‘method’ property letting my event could auto alarm.

const eventId = await Calendar.createEventAsync("2", {
            alarms: [{
                method: Calendar.AlarmMethod.ALERT,
                relativeOffset: -1
            },{
                method: Calendar.AlarmMethod.ALARM,
                relativeOffset: 0
            },{
                method: Calendar.AlarmMethod.ALERT,
                relativeOffset: -10
            }],
            allDay: false,
            calendarId: "2",
            title: 'test ttile',
            startDate: new Date(startTime),
            endDate: new Date(startTime)
        })

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.