I want to use volume button as a Start/Stop button in my own app. As far as I know there is only third party camera app that is able to use volume button as the control.
My question is, can it work on other type of app beside camera app? Will Apple reject my app if I am using volume button as a control/input?
Is there any Apple Documentation that state those restriction?
Look at AVSystemController_SystemVolumeDidChangeNotification.
See: iPhone SDK 4 - How to programmatically detect volume hardware button press?
or
program access to iPhone volume buttons or
https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/index.html#//apple_ref/occ/instp/AVAudioSession/outputVolume
for all I know it isn't private anymore after iOS 3.0
Related
I am trying to check for keyboard notification show/hide outside of my ios apps. I tried to run keyboard notification in the background, did not work.
I expected to switch to a different app or homescreen and my ios app should detect whether keyboard is shown or hide when i'm outside my ios apps.
it is not possible since app do not communicate with each others by default. just like in the previous answer, it's because of sandboxing. If you could tell what you want to achieve, we might be able to help
I need to create sticky button which is on screen like hike button in ios
If i detect that application(WhatsApp) state event so i solve this problem. Thats why i need to create another application launched event.
Thank you in advance.
Apps on iOS are sandboxed and can not directly communicate with other apps directly. There are some API's in the iOS SDK which allows some interaction, mostly audio, share of items.
Apple does not expose to you app if an other app is launched, so checking that an other is launched is not possible.
The second issue is that you can draw on de screen outside of you own apps windows. So you will not be able to draw a button on top of some other app.
I am currently working on a Unity3D iOS game.I want to override the default Volume View in iOS and implement a custom UI control like in Snapchat and Instagram.
Screenshot:
What you need is low level access to your native iOS application in order to use swift code to disable the volume HUD.
I cannot explain how to do this better than this https://github.com/blitzagency/ios-unity5/blob/master/README.md
Follow the instructions carefully until you are able to setup swift in unity.
Here is a good page on disabling the volume HUD in swift: Hide device Volume HUD view while adjusitng volume with MPVolumeView slider
Hope this helps.
I would like to execute some code when user presses one of home, power or volume buttons(it doesn't matter, which of these).
I would like to catch events even application is minimized to background and device is sleeping.
So primary task is processing events, when device is inside user's pocket and the user presses button, but not takes out the device.
Is that possible? If it isnt't possible for power button, may be it's possible for volume or home buttons? How can I do it?
Your application cannot interact with the hardware buttons on an iOS device. Your application can receive notification that it has entered the background (which may be a side-effect of the use pressing the home button, for example) but that is about all
There is idea about volume buttons, if you create player instance you can get notifications about volume change, not sure that is still work but you can try.
see answers here: program access to iPhone volume buttons
My question:
I have an iOS app, it is minimized, and I want it to start when user press home button three times (or, for example combination of buttons, like "HOME+Volume-" and so on). Can I make it for non-jailbroken devices, only with native iOS functions?
It's not possible to customise iOS like that.
Without jailbraking, apps can only be opened by using custom URL schemes from other apps or by normally tapping on the on the home screen. To have an app open like this you would have to modify the OS and there is no way you can do that without a jailbreak.
Standard OS functionality like pressing the home button multiple times cannot be overridden because Apple is really against modifying any part of way the user interacts with apps or the OS.
No.
Not possible without jailbreak and then it would have to be some sort of preference in the OS settings.