How to disable iPod Music Control when device screen is locked? - ios

I'm using MPMusicPlayerController in my app and it works fine in background.
The problem is I don't want user to control the song via iPod music app while device is locked?
Thank you for any helps.

I don't have knowledge in ipod.
As on IOS, You should detect when device goes sleep/lock mode. When the device goes lock/sleep, then u can control your music in sleep mode method function.

Related

iOS play/pause video playing on other device by bluetooth

I want build a iOS app have some function:
Connect to another iphone (Target phone) by bluetooth connection (I did it completely)
Have two button: play, pause. After connect to Target phone, user can switch state play or pause of video playing on target phone (like video playing on youtube, netflix, hulu).
I tested with: MPMusicPlayerController.systemMusicPlayer.pause() but it only work with system music app, I need work with youtube, netflix...
Anyone have some idea? Please help me. Thank you!

How to programmatically identify Quicktime player is recording the ios device screen when device is connected to mac?

I want to trigger a alert in a ios app when the ios device screen is captured using quicktime player.
Please guide me if there is a way to detect this.

IPhone state from sound mode to silent/vibrate mode

I want to develop an iOS app which on button tapped the phone state from sound mode to silent/vibrate mode . how to do it??
There is no official/legal/acceptable by Apple way to accomplish what you want. However, if you are still interested you should check private libraries for the app for jailbroken devices.

IOS AIR app still running when the iphone is locked?

I just made a simple game with flash professional 6.0 and the adobe AIR 4.4 SDK for iPhone.
The problem is that when I lock the iphone pressing the power button, the screen switches off as usual, but the music of the game still sounds. If I exit the game pressing the home button it exits fine. Is only when locking the phone with the app opened.
Try add listeners for the events Event.DEACTIVATE on your main class and Event.EXITING on NativeApplication.nativeApplication.
On the events handlers you can do what you want to stop / pause your game.
Add a listener to the event Event.ACTIVATE on the main class to resume the game.

How to continue play html5 audio when screen locked?

I have an audio element in the UIWebView, but when I lock the screen, the audio will be paused. How can I continue to play it when the screen locked?
If you are talking about iOS devices, then as long as you do not bookmark the site to the home screen and Safari is open and playing the audio, it will continue to play when the screen locks. Only if you try to multi-task will it shut off the sound on your page.
You must ensure that background audio is enabled in your iOS app. You can find a sample project here https://github.com/jsagorin/iOSBackgroundAudio

Resources