Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change lock screen background audio controls text?

I have an iOS app that streams background audio using AVAudioSession. It is working correctly, but I am curious, is there any way to change the text on the lock screen audio controls? Right now it simply displays the name of my app, but I would like to change it to the name of the track.

Additionally, the multi-tasking bar has no text under the controls- is there a way to add the track name there, as the iPod app does?

like image 420
Keller Avatar asked Jul 06 '11 17:07

Keller


People also ask

How do I change the shortcuts on my iPhone lock screen?

You can swipe left and right to choose a different existing Lock Screen, and then long press one to set it. Alternatively, you can tap Customize to personalize the currently selected Lock Screen, or tap the blue + button to create a completely new one.

How do I get the list on my iPhone lock screen?

Just drag down the notification center on your lock screen and you will see your to-do-list from one of these apps.. You can also use Apple's Reminders, these will also display in the notification center..

How do I swipe the camera on my lock screen?

In Lock Screen settings, tap on "Lock Screen widgets" , then select Favourite apps or Camera. Swipe the default lock screen from right to left to open Camera (or Widgets) when in the lock screen.

How do I Change my lock screen background on Windows 10?

Change your Lock Screen Background Image to Windows Spotlight, Picture, or Slideshow in Settings. 1 Open Settings, and click/tap on the Personalization icon. 2 Do step 3 (Windows spotlight), step 4 (picture), or step 5 (slideshow) below for what you want as your lock screen background.

What is the default lock screen background image?

If you have a custom Lock screen background set, you will see your Lock screen background is now used for both the Lock screen and Sign-in screen by default. The default lock screen background images included in Windows are located in the C:WindowsWebScreen folder.

How do I customize the lock screen to display a picture?

If you want to see always a particular image, you can customize the Lock screen to display a single image with these steps: Open Settings. Click on Personalization. Click on Lock screen. Use the "Background" drop-down menu, and select the Picture option. Click the Browse button to locate the image you want to use.

What can I do with Windows 10 lock screen?

For example, in the Lock screen, you can see the current date and time, show calendar events, and notifications from other apps. You can also interact with Cortana, showcase your favorite background images, personal pictures, and beautiful images from Bing using Windows Spotlight.


2 Answers

iOS 5 now supports setting the track title as well as an album art image in both the lock screen and the remote playback controls (the controls you get when you double-click the home button and swipe right). Take a look at the MPNowPlayingInfoCenter class. Of course, to maximize compatibility, you'd want to test whether MPNowPlayingInfoCenter is available, by doing something like:

if ([MPNowPlayingInfoCenter class])  {    /* we're on iOS 5, so set up the now playing center */    UIImage *albumArtImage = [UIImage imageNamed:@"HitchHikersGuide"];    albumArt = [[MPMediaItemArtwork alloc] initWithImage:albumArtImage];      NSDictionary *currentlyPlayingTrackInfo = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"Life, the Universe and Everything", [NSNumber numberWithInt:42], albumArt, nil] forKeys:[NSArray arrayWithObjects:MPMediaItemPropertyTitle, MPMediaItemPropertyPlaybackDuration, MPMediaItemPropertyArtwork, nil]];     [MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = currentlyPlayingTrackInfo; } 
like image 118
Donald Burr Avatar answered Oct 10 '22 05:10

Donald Burr


here it is in swift! (no need to check for iOS 5 and up anymore)

let albumArt = MPMediaItemArtwork(image: UIImage(named:"HitchHikersGuide")) let albumDict = [MPMediaItemPropertyTitle: "Life, the Universe and Everything", MPMediaItemPropertyPlaybackDuration: 42, MPMediaItemPropertyArtwork: albumArt] MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo = albumDict 
like image 23
Mike Sprague Avatar answered Oct 10 '22 06:10

Mike Sprague