@rocapine/expo-widget-activation
v0.2.0
Published
Widget activation toolkit for Expo apps: WidgetKit installed-widget detection, app suspend, foreground detection hook, and a muted looping tutorial video player with PiP.
Keywords
Readme
@rocapine/expo-widget-activation
Widget activation toolkit for Expo apps:
Cross-platform APIs
getInstalledWidgets()— WidgetKitgetCurrentConfigurations(iOS);AppWidgetManagerquery (Android);[]if bridge unavailable.suspendApp()— backgrounds the app (iOS: undocumented selector, accepted review risk; Android:moveTaskToBack).isWidgetInstalled(widgets, kind)— predicate helper.useWidgetDetection({ enabled, isTarget, onDetected })— fires once the target widget appears on an app-foreground check.@rocapine/expo-widget-activation/video—TutorialVideo(muted, loop, initialTime, playbackRate, PiP) +videoProgress. Requiresexpo-video.
iOS
WidgetKit detection via WidgetCenter.getCurrentConfigurations.
Android
Widget detection via AppWidgetManager.getAppWidgetIds. Pin widget via AppWidgetManager.requestPinAppWidget + isPinSupported check. Note: no dismiss callback on Android — observe widget removal via polling or detect on app-foreground checks. suspendApp() uses moveTaskToBack to background the app.
Install
From npm registry (v0.2.0+):
npm install @rocapine/expo-widget-activation@^0.2.0From git (dist committed):
"@rocapine/expo-widget-activation": "github:Rocapine/expo-widget-activation#v0.2.0"Autolinks as a standard Expo module — new native build required after install.
