-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (19 loc) · 813 Bytes
/
index.js
File metadata and controls
23 lines (19 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { Platform } from "react-native";
// Import the Expo Router entry point
// Note: backgroundSync is imported in app/_layout.tsx to avoid loading expo modules in widget context
import "expo-router/entry";
// Only register Android widgets on Android platform
if (Platform.OS === "android") {
const {
registerWidgetConfigurationScreen,
registerWidgetTaskHandler,
} = require("react-native-android-widget");
const { widgetTaskHandlerEntry } = require("./widget-task-handler");
const {
WidgetConfigurationScreen,
} = require("./widgets/WidgetConfigurationScreen");
// Register the widget task handler before app starts
registerWidgetTaskHandler(widgetTaskHandlerEntry);
// Register the widget configuration screen
registerWidgetConfigurationScreen(WidgetConfigurationScreen);
}