mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-04 03:27:14 -05: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 => {
 | 
			
		||||
	return withAndroidManifest(c, async (config) => {
 | 
			
		||||
		const manifest = config.modResults.manifest;
 | 
			
		||||
		console.log(manifest);
 | 
			
		||||
		// manifest.application!.push();
 | 
			
		||||
		manifest.application![0].service ??= [];
 | 
			
		||||
		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;
 | 
			
		||||
	});
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -5,8 +5,8 @@
 | 
			
		||||
	"sideEffects": false,
 | 
			
		||||
	"scripts": {
 | 
			
		||||
		"dev": "expo start",
 | 
			
		||||
		"android": "expo start --android",
 | 
			
		||||
		"ios": "expo start --ios",
 | 
			
		||||
		"android": "expo run:android",
 | 
			
		||||
		"ios": "expo run:ios",
 | 
			
		||||
		"web": "expo start --web",
 | 
			
		||||
		"build": "eas build --profile production --platform android --non-interactive --auto-submit",
 | 
			
		||||
		"build:apk": "eas build --profile preview --platform android --non-interactive --json",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user