mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-31 10:37:13 -04:00 
			
		
		
		
	Add service in android manifest for notifications
This commit is contained in:
		
							parent
							
								
									13309bce20
								
							
						
					
					
						commit
						cb96e87ad7
					
				| @ -79,8 +79,19 @@ const config: ExpoConfig = { | |||||||
| const withForegroundService = (c: ExpoConfig): ExpoConfig => { | const withForegroundService = (c: ExpoConfig): ExpoConfig => { | ||||||
| 	return withAndroidManifest(c, async (config) => { | 	return withAndroidManifest(c, async (config) => { | ||||||
| 		const manifest = config.modResults.manifest; | 		const manifest = config.modResults.manifest; | ||||||
| 		console.log(manifest); | 		manifest.application![0].service ??= []; | ||||||
| 		// manifest.application!.push();
 | 		manifest.application![0].service.push({ | ||||||
|  | 			$: { | ||||||
|  | 				"android:name": "com.brentvatne.exoplayer.VideoPlaybackService", | ||||||
|  | 				"android:exported": "false", | ||||||
|  | 				"android:foregroundServiceType": "mediaPlayback", | ||||||
|  | 			}, | ||||||
|  | 			"intent-filter": [ | ||||||
|  | 				{ | ||||||
|  | 					action: [{ $: { "android:name": "androidx.media3.session.MediaSessionService" } }], | ||||||
|  | 				}, | ||||||
|  | 			], | ||||||
|  | 		}); | ||||||
| 		return config; | 		return config; | ||||||
| 	}); | 	}); | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ | |||||||
| 	"sideEffects": false, | 	"sideEffects": false, | ||||||
| 	"scripts": { | 	"scripts": { | ||||||
| 		"dev": "expo start", | 		"dev": "expo start", | ||||||
| 		"android": "expo start --android", | 		"android": "expo run:android", | ||||||
| 		"ios": "expo start --ios", | 		"ios": "expo run:ios", | ||||||
| 		"web": "expo start --web", | 		"web": "expo start --web", | ||||||
| 		"build": "eas build --profile production --platform android --non-interactive --auto-submit", | 		"build": "eas build --profile production --platform android --non-interactive --auto-submit", | ||||||
| 		"build:apk": "eas build --profile preview --platform android --non-interactive --json", | 		"build:apk": "eas build --profile preview --platform android --non-interactive --json", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user