Экспо-календарный задержка между событием и открытым событиемAndroid

Форум для тех, кто программирует под Android
Anonymous
Экспо-календарный задержка между событием и открытым событием

Сообщение Anonymous »

Я создаю новое событие в календаре с помощью Expo-Calender. Создание работает, но есть некоторая задержка, прежде чем новое событие можно будет просмотреть в календаре. Моя цель-Android. < /P>

Код: Выделить всё

import * as Calendar from 'expo-calendar';

// this created the event fine
const eventId = await Calendar.createEventAsync(primaryCalendar.id, { ... });

// this retrieved the event fine
const event = await Calendar.getEventAsync(eventId);

// when this is called immediately after the previous steps, the Calendar app will say the event does not exist.
// if I wait for a few seconds before calling this, then it will work.
await Calendar.openEventInCalendarAsync({ id: eventId });
Кто -нибудь знает, есть ли условие, которое я могу ждать, прежде чем попытаться назвать OpenEventincalEndarasync , чтобы обеспечить успех?>

Подробнее здесь: https://stackoverflow.com/questions/797 ... open-event

Вернуться в «Android»