|
| 1 | +import type { ConfigContext, ExpoConfig } from 'expo/config'; |
| 2 | +import type { WithAndroidWidgetsParams } from 'react-native-android-widget'; |
| 3 | + |
| 4 | +// Widget configuration |
| 5 | +const widgetConfig: WithAndroidWidgetsParams = { |
| 6 | + widgets: [ |
| 7 | + { |
| 8 | + name: 'ModemStatus', |
| 9 | + label: 'Modem Status', |
| 10 | + description: 'Display modem speed and usage statistics', |
| 11 | + minWidth: '180dp', |
| 12 | + minHeight: '110dp', |
| 13 | + // Default size: 3x2 cells |
| 14 | + targetCellWidth: 3, |
| 15 | + targetCellHeight: 2, |
| 16 | + // Max resize: 5x4 cells |
| 17 | + maxResizeWidth: '320dp', |
| 18 | + maxResizeHeight: '280dp', |
| 19 | + // Widget preview image |
| 20 | + previewImage: './assets/widget-preview/modem_status.png', |
| 21 | + // Update every 30 minutes (minimum allowed) |
| 22 | + updatePeriodMillis: 1800000, |
| 23 | + // Allow widget to be resized |
| 24 | + resizeMode: 'horizontal|vertical', |
| 25 | + }, |
| 26 | + ], |
| 27 | +}; |
| 28 | + |
| 29 | +export default ({ config }: ConfigContext): ExpoConfig => ({ |
| 30 | + ...config, |
| 31 | + name: 'Huawei Manager', |
| 32 | + slug: 'hm-mobile', |
| 33 | + version: '1.0.25', |
| 34 | + orientation: 'portrait', |
| 35 | + icon: './assets/logo.png', |
| 36 | + userInterfaceStyle: 'automatic', |
| 37 | + scheme: 'hm-mobile', |
| 38 | + plugins: [ |
| 39 | + 'expo-router', |
| 40 | + [ |
| 41 | + 'expo-build-properties', |
| 42 | + { |
| 43 | + android: { |
| 44 | + usesCleartextTraffic: true, |
| 45 | + }, |
| 46 | + }, |
| 47 | + ], |
| 48 | + 'expo-localization', |
| 49 | + ['react-native-android-widget', widgetConfig], |
| 50 | + ], |
| 51 | + splash: { |
| 52 | + image: './assets/logo.png', |
| 53 | + resizeMode: 'contain', |
| 54 | + backgroundColor: '#ffffff', |
| 55 | + }, |
| 56 | + ios: { |
| 57 | + supportsTablet: true, |
| 58 | + }, |
| 59 | + android: { |
| 60 | + adaptiveIcon: { |
| 61 | + foregroundImage: './assets/logo.png', |
| 62 | + backgroundColor: '#ffffff', |
| 63 | + }, |
| 64 | + edgeToEdgeEnabled: true, |
| 65 | + predictiveBackGestureEnabled: false, |
| 66 | + package: 'com.alrescha79.hmmobile', |
| 67 | + }, |
| 68 | + web: { |
| 69 | + favicon: './assets/logo.png', |
| 70 | + }, |
| 71 | + extra: { |
| 72 | + eas: { |
| 73 | + projectId: '930db156-f012-4b37-809c-d023a044d3b3', |
| 74 | + }, |
| 75 | + }, |
| 76 | +}); |
0 commit comments