iOS remote control - disable next and previous song buttons - ios

I'm writing a streaming app that's using the remote control feature (remoteControlReceivedWithEvent:).
I can start and stop songs with the remote control as expected.
But I can't seem find out how to disable the next and previous song button on the home screen (double-tap home and swipe all the way to the left).
I'm using a MPMoviePlayerController internally.
Thanks :)

As far as I know the API doesn't allow you to show the buttons as disabled. I think the best you can do is just not take any action when one of those buttons are pressed.
I have not observed any other major app that shows the remote buttons as disabled.

Related

How to disable the home indicator of iOS in Expo?

I am using expo SDK 46. I would like to make the home indicator inactive or hide it. In my case, just one gesture movement closes the application. I want to make it harder for users since they can accidentally send the app to the background. As far as I see, we need two separate gesture movements to send the game to the background. An example game is Pokemon Unite. So, it should be possible.
I am already using expo-status-bar to hide the Status bar, and it seems it is not affecting the home indicator.
Any help is appreciated.

How to add a view/gesture recognisers to iPhone/iPad home Screen

Until today I believed that it's impossible but there is an app is called Shou from the Emu4iOS Store that record your screen and even if the app is in background there is a view on home screen that on touch redirect you to the app. (please see attached image)
My Question is how can I achieve the same ? How can I add a view to Home screen ?
That's a status bar in a recording state. These are system defined states, such as the green bar you get while taking a call. These appear when an app is recording audio automatically, and there is no way to trigger it manually.
There is no way to add views and gesture recognizers on to the springboard.

How can I trigger the action of power button in my iPhone app?

I want to do some action in my app when the user presses the power button two times while my app is already in background/closed. How can I trigger the action of power button for it inside my app? or if I can add any observer in my app for such action? Is it possible to get this functionality in iOS?
Thanks for help
It is not possible to observe exactly on touching any button on the device. It is the same with volume buttons, you can observe the effect (volume went up or down) but not the pushing button in fact (the volume changed could be triggered in other way).
Sum up:
This is not possible, do not go for it.

Hide next/previous track controls on iOS

I am using AVPlayer to playback a continuous internet radio stream. I set up an AVAudioSession and my Info.plist to continue playback while the app is in background, and handle the remote control events to play, pause and stop.
On iOS there are controls for next and previous track in the multitasking bar, in the lock screen, on connected Bluetooth devices and so on. With these controls available and not "grayed out" the user assumes he could skip to another "track". But this is not possible in my scenario. There are no single "tracks". The app can only consume what is played by the icecast server.
Question: Is it possible to hide or disable these controls, so the user understands that it is not possible to skip to another "track"? (And if yes, how?)
No. Just don't respond to those controls. Respond only to the controls you do respond to (e.g. playpause button).
In this example from one of my apps:
The "next" and "previous" buttons do nothing; they are meaningless. But I've never gotten a complaint from a user.

Bring previous app back to the front when user is done with my iOS app

My iOS 4/5/6 app is meant to be used briefly. I want the user to click a "Done, now go away" button which takes them back to the app they were using before mine came to the front.
Is there a way for my iOS to put itself in the background while returning the previous app to the front?
On an iPad, the user can get that effect by doing a four-finger swipe horizontally across the screen. But that gesture is not a complete solution because (a) that gesture does not work on a handheld device, and (2) not many users know of that gesture. I want to programmatically return the previous app to the front.
I want the user to click a "Done, now go away" button
That button is the Home button.
I want to programmatically return the previous app to the front.
There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.
I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.
Launch App Via URL Scheme!

Resources