- Add expo-notifications dependency and configure with JPush plugin - Request notification permission on app launch for iOS/Android - Handle notification taps to navigate to chat or notifications screen - Add UI to check and request system notification permission in settings - Refactor background sync: WebSocket disconnects in background, JPush handles push - Add checkNotificationPermission() and requestNotificationPermission() to jpushService
166 lines
4.7 KiB
JSON
166 lines
4.7 KiB
JSON
{
|
|
"expo": {
|
|
"name": "威友",
|
|
"slug": "qojo",
|
|
"version": "0.0.2",
|
|
"orientation": "default",
|
|
"icon": "./assets/icon.png",
|
|
"userInterfaceStyle": "automatic",
|
|
"scheme": "withyou",
|
|
"splash": {
|
|
"image": "./assets/splash-icon.png",
|
|
"resizeMode": "contain",
|
|
"backgroundColor": "#ffffff"
|
|
},
|
|
"ios": {
|
|
"supportsTablet": true,
|
|
"infoPlist": {
|
|
"NSMicrophoneUsageDescription": "允许威友访问您的麦克风以进行语音通话",
|
|
"UIBackgroundModes": [
|
|
"fetch",
|
|
"remote-notification",
|
|
"fetch",
|
|
"remote-notification",
|
|
"audio"
|
|
],
|
|
"ITSAppUsesNonExemptEncryption": false
|
|
},
|
|
"bundleIdentifier": "cn.qczlit.withyou"
|
|
},
|
|
"android": {
|
|
"adaptiveIcon": {
|
|
"backgroundColor": "#E6F4FE",
|
|
"foregroundImage": "./assets/android-icon-foreground.png",
|
|
"backgroundImage": "./assets/android-icon-background.png",
|
|
"monochromeImage": "./assets/android-icon-monochrome.png"
|
|
},
|
|
"predictiveBackGestureEnabled": false,
|
|
"jsEngine": "hermes",
|
|
"package": "cn.qczlit.withyou",
|
|
"versionCode": 7,
|
|
"permissions": [
|
|
"VIBRATE",
|
|
"RECORD_AUDIO",
|
|
"RECEIVE_BOOT_COMPLETED",
|
|
"WAKE_LOCK",
|
|
"READ_EXTERNAL_STORAGE",
|
|
"WRITE_EXTERNAL_STORAGE",
|
|
"READ_MEDIA_IMAGES",
|
|
"READ_MEDIA_VIDEO",
|
|
"READ_MEDIA_AUDIO",
|
|
"android.permission.RECEIVE_BOOT_COMPLETED",
|
|
"android.permission.WAKE_LOCK",
|
|
"android.permission.READ_EXTERNAL_STORAGE",
|
|
"android.permission.WRITE_EXTERNAL_STORAGE",
|
|
"android.permission.READ_MEDIA_VISUAL_USER_SELECTED",
|
|
"android.permission.ACCESS_MEDIA_LOCATION",
|
|
"android.permission.READ_MEDIA_IMAGES",
|
|
"android.permission.READ_MEDIA_VIDEO",
|
|
"android.permission.READ_MEDIA_AUDIO",
|
|
"android.permission.ACCESS_NETWORK_STATE",
|
|
"android.permission.ACCESS_WIFI_STATE",
|
|
"android.permission.POST_NOTIFICATIONS"
|
|
]
|
|
},
|
|
"web": {
|
|
"favicon": "./assets/favicon.png"
|
|
},
|
|
"plugins": [
|
|
"./plugins/withMainActivityConfigChange",
|
|
[
|
|
"./plugins/withForegroundService",
|
|
{
|
|
"notificationTitle": "威友",
|
|
"notificationBody": "正在后台同步消息",
|
|
"notificationIcon": "ic_notification",
|
|
"channelId": "withyou_sync_foreground",
|
|
"channelName": "消息同步"
|
|
}
|
|
],
|
|
[
|
|
"expo-router",
|
|
{
|
|
"headers": {
|
|
"Cross-Origin-Embedder-Policy": "credentialless",
|
|
"Cross-Origin-Opener-Policy": "same-origin"
|
|
}
|
|
}
|
|
],
|
|
"expo-sqlite",
|
|
[
|
|
"expo-camera",
|
|
{
|
|
"cameraPermission": "允许威友访问您的相机以扫描二维码"
|
|
}
|
|
],
|
|
[
|
|
"expo-background-task",
|
|
{
|
|
"minimumInterval": 15
|
|
}
|
|
],
|
|
[
|
|
"expo-media-library",
|
|
{
|
|
"photosPermission": "允许威友访问您的照片以发布内容",
|
|
"savePhotosPermission": "允许威友保存照片到您的相册",
|
|
"isAccessMediaLocationEnabled": true
|
|
}
|
|
],
|
|
[
|
|
"expo-image-picker",
|
|
{
|
|
"photosPermission": "允许威友访问您的照片以选择图片",
|
|
"cameraPermission": "允许威友访问您的相机以拍摄图片",
|
|
"colors": {
|
|
"cropToolbarColor": "#111827",
|
|
"cropToolbarIconColor": "#ffffff",
|
|
"cropToolbarActionTextColor": "#ffffff",
|
|
"cropBackButtonIconColor": "#ffffff",
|
|
"cropBackgroundColor": "#f3f4f6"
|
|
},
|
|
"dark": {
|
|
"colors": {
|
|
"cropToolbarColor": "#000000",
|
|
"cropToolbarIconColor": "#ffffff",
|
|
"cropToolbarActionTextColor": "#ffffff",
|
|
"cropBackButtonIconColor": "#ffffff",
|
|
"cropBackgroundColor": "#0a0a0a"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
[
|
|
"expo-video",
|
|
{
|
|
"proguardRules": "-keep class com.google.android.exoplayer2.** { *; }"
|
|
}
|
|
],
|
|
"expo-font",
|
|
[
|
|
"expo-notifications",
|
|
{
|
|
"color": "#E6F4FE",
|
|
"defaultChannel": "default",
|
|
"enableBackgroundRemoteNotifications": true
|
|
}
|
|
],
|
|
[
|
|
"./plugins/withJPush",
|
|
{
|
|
"appKey": "2cbe4da12e2c24aa3dca4610",
|
|
"channel": "developer-default"
|
|
}
|
|
]
|
|
],
|
|
"extra": {
|
|
"eas": {
|
|
"projectId": "65540196-d37d-437b-8496-227df0317069"
|
|
},
|
|
"jpushAppKey": "2cbe4da12e2c24aa3dca4610",
|
|
"jpushChannel": "developer-default"
|
|
},
|
|
"owner": "qojo"
|
|
}
|
|
}
|