ios - Get information of currently playing tracks other than music app in native app objective c -


i want detect playing song in native app ether 1 audio session in app. implemented below , when song playing through phone music app, working fine.

-(void)checksession {     bool isplayingwithothers = [[avaudiosession sharedinstance] isotheraudioplaying];     if(isplayingwithothers)     {         _controller = [mpmusicplayercontroller systemmusicplayer];         [_play setenabled:yes];         [_pause setenabled:yes];         [_next setenabled:yes];         [_prev setenabled:yes];     } } 

but if song playing app pandora app, mpmusicplayercontroller not working. please suggest how can control next, prev, play , pause if song being played via apps rather phone music app.

any highly appreciated! in advance!

• cannot control playback of other apps own app unless has drastically changed in ios11.

• in same vein, cannot info on playing unless using 1 of built-in musicplayers (systemmusicplayer, , maybe applicationmusicplayer)

i have not looked on changes in ios11 see if has changed.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -