Avoid stopping music on opening an Ionic App


If I listen music (on Spotify for example) and then I open the Ionic app, the sound is paused.
Is there a way to avoid this?

Thanks for your help,

Please post which plugins you are using

Hi @EinfachHans,

sorry for my late reply :confused:

Here are the plugins used in the file app.component.ts :

import { Component, NgZone } from '@angular/core';
import { Platform, NavController, AlertController } from '@ionic/angular';
import { SplashScreen } from '@capacitor/splash-screen';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
import { NavigationBar } from '@ionic-native/navigation-bar/ngx';
import { StatusBar, Style } from '@capacitor/status-bar';
import { Router, NavigationEnd } from '@angular/router';
import { filter } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { Store } from '@ngrx/store';
import { Market } from '@ionic-native/market/ngx';
import { App, URLOpenListenerEvent } from '@capacitor/app';

Kind regards

I’ve the same problem, my app doesn’t use audio feature and/or plugins.

Any idea on how to solve?

Hmmm, I haven’t seen this before. Can you provide a mimimal example?

i’ve solved removing cordova plugin background mode since i don’t use it anymore.

but this guy has patched the background-mode plugin for fixing it.


1 Like