Expo是一个开源和免费的平台,它允许Web开发人员通过JavaScript编写一次,构建真正适用于iOS和Android的本机应用程序。在有关开发Expo项目和使用XDE和exp等Expo开发工具的问题上使用Expo标签。
我如何在刷卡上修复此图像闪烁问题? 我已经构建了一个卡片堆UI,该卡片UI显示了多个图像作为堆栈,我们可以通过滑动将其删除。但是,当我向左滑动以删除图像时,它一次在其原始位置闪烁。我没去过...
代码:
ExpoCLI构建并部署到Android,但RN或Gradle Build/Deplote not
一个新创建的本地Expo CLI项目,我经营着一个预构建,以生成Android React构建构建层次结构下的./android subdir错误在CD ./android上部署期间出现; NPX r ...
export function useRefreshOnFocus<T>(refetch: () => Promise<T>) { const firstTimeRef = React.useRef(true) useFocusEffect( React.useCallback(() => { if (firstTimeRef.current) { firstTimeRef.current = false return } refetch() }, [refetch]), ) }
Expo Router 52 not detecting files and directories in app directory
I am using React Native Expo Router SDK 52 that uses file-based routing to navigate between screens. I am experiencing a slight malfunctioning of either VS Code or Expo and I have closed VS Code and
如何更改或删除Expo路由器选项卡组件中标签栏项目的连锁效果?
<Tabs initialRouteName="Dashboard" screenOptions={{ tabBarShowLabel: true, headerPressColor: "red", headerPressOpacity: 0, headerShown: false, tabBarStyle: styles.tabBarStyle, }} > <Tabs.Screen name="Dashboard" options={{ tabBarIcon: ({ focused }) => ( <LinearGradient colors={["#00A4E4", "#1EB0E9"]} start={{ x: 0.5, y: 0 }} end={{ x: 0.5, y: 1 }} style={styles.gradientIcon} > <Image source={icons.Home1} resizeMode="contain" style={styles.mainIcon} /> </LinearGradient> ), tabBarLabel: () => null, }} /> </Tabs>
<Text style={{ color: colors.START_TRIP, textAlign: isRTL ? "right" : "left", lineHeight: 45, fontSize: 24, fontFamily: fonts.Bold, }} > {settings.symbol}{" "} {payDetails.payableAmount ? parseFloat(payDetails.payableAmount).toFixed( settings.decimal ) : 0.0} {/* --- Added this conditional check (line to append "/hr") --- */} {booking.rate_per_hour > 0 ? "/hr" : ""} </Text> ) : ( <Text style={{ color: colors.START_TRIP, textAlign: isRTL ? "right" : "left", lineHeight: 45, fontSize: 24, fontFamily: fonts.Bold, }} > {payDetails.payableAmount ? parseFloat(payDetails.payableAmount).toFixed( settings.decimal ) : 0.0}{" "} {settings.symbol} {/* --- Same conditional check here --- */} {booking.rate_per_hour > 0 ? "/hr" : ""} </Text>
firebase/auth
Expo应用程序计划的本地通知立即触发,未安排 我已经使用Expo构建了一个带有React JS的应用程序。我正在尝试安排本地通知。通知ID正在生成。但是它是立即触发的,没有被安排。我记录了...
import * as Notifications from 'expo-notifications'; import { Alert, Platform } from 'react-native'; import Constants from "expo-constants"; import * as Device from 'expo-device'; Notifications.setNotificationHandler({ handleNotification: async () => ({ shouldShowAlert: true, // ✅ Ensures the notification is displayed shouldPlaySound: true, // ✅ Enables sound shouldSetBadge: false, // ❌ No badge update }), }); async function createNotificationChannel() { if (Platform.OS === 'android') { await Notifications.setNotificationChannelAsync('default', { name: 'Default Channel', importance: Notifications.AndroidImportance.MAX, vibrationPattern: [0, 250, 250, 250], lightColor: '#FF231F7C', }); } } // ✅ Request Notification Permission and return boolean status async function requestNotificationPermission() { const { status } = await Notifications.getPermissionsAsync(); Alert.alert("🔍 Initial Permission Status", status); // ✅ Show initial permission status console.log("🔍 Initial Permission Status", status); if (status !== 'granted') { const { status: newStatus } = await Notifications.requestPermissionsAsync(); Alert.alert("📢 New Permission Status", newStatus); // ✅ Show new permission status console.log("📢 New Permission Status", newStatus); if (newStatus !== 'granted') { Alert.alert('❌ Permission Denied', 'Notifications are disabled.'); return false; } } return true; } // ✅ Schedule Daily Notification async function scheduleDailyNotification() { await createNotificationChannel(); await Notifications.cancelAllScheduledNotificationsAsync(); // Clears old schedules to prevent duplicates await Notifications.scheduleNotificationAsync({ content: { title: "Daily Reminder", body: "It is a scheduled notification!", sound: "default", priority: Notifications.AndroidNotificationPriority.MAX, }, trigger: { hour: 20, // ✅ 8:10 PM (24-hour format) minute: 10, repeats: true, // 🔄 Repeat every day useUTC: false, }, }); // ✅ Fetch all scheduled notifications to verify it's scheduled const scheduled = await Notifications.getAllScheduledNotificationsAsync(); console.log("📅 Scheduled Notifications:", scheduled); if (scheduled.length > 0) { Alert.alert("✅ Notification Scheduled", `Next reminder at 3:00 PM`); } else { Alert.alert("❌ No Notifications Scheduled", "Something went wrong."); } } export { scheduleDailyNotification };
Use Google Drive API with google service account from Expo app (react native)
I am quite new in app development with Expo (react native). I am trying to access the google drive API from my application (for private use), to have the app read some files which are in a specific