![]() |
XE4 auf iOS
Hi,
ich versuche mich gerade in die Materie einzulesen und möchte einen Radiostream auf einem Tablet abspielen und zwar im Hintergrund. Die Wiedergabe funktioniert und auch im Hintergrundbetrieb. Dafür muss man ja nur <key>UIBackgroundModes</key> <array> <string>audio</string> </array> in die PList eintragen. Nun möchte ich aber auch das die Audiokontrollen wie Stop/Play und Lautstärke im Sperrbildschirm dargestellt werden. Dafür sollte man, laut Apple via sharedApplication.beginReceivingRemoteControlEvent s beim Verstecken des Views aufrufen und sharedApplication.endReceivingRemoteControlEvents sobald das View wieder sichtbar wird. Also bei OnHide bzw. OnShow. Leider geht das ganze nicht und ich habe die Befürchtung das es daran liegt, dass ich noch das remoteControlReceivedWithEvent implementieren muss. Hat das jemand schon einmal gemacht? |
AW: XE4 auf iOS
Was übrigens auch nicht geht ist das hier:
Delphi-Quellcode:
Ich verstehe das nicht, das sollte doch selbst mit XCode laufen :(
LNowPlayingInfoCenter := TMPNowPlayingInfoCenter.Wrap
(TMPNowPlayingInfoCenter.OCClass.defaultCenter); if LNowPlayingInfoCenter <> nil then begin LDict := TNSMutableDictionary.Create; try LDict.setObject((NSStr('Title') as ILocalObject).GetObjectID, (NSStr('MPMediaItemPropertyTitle') as ILocalObject).GetObjectID); LDict.setObject((NSStr('Artist') as ILocalObject).GetObjectID, (NSStr('MPMediaItemPropertyArtist') as ILocalObject).GetObjectID); LDict.setObject((NSStr('Album') as ILocalObject).GetObjectID, (NSStr('MPMediaItemPropertyAlbumTitle') as ILocalObject).GetObjectID); LNowPlayingInfoCenter.setNowPlayingInfo(LDict); finally LDict.release; end; end; |
AW: XE4 auf iOS
MPMediaItemPropertyTitle ist nur eine Konstante mit dem Wert title, nimm den anstelle.
Probier mal beginreceivingcomponent am Anfang, also andersherum. Die angesprochene remotecontrol Funktion musst du implementieren, dass geht leider nicht anders. Ich wüsste aber jetzt auch nicht wie. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz