Using camera on background (multitasking?) on ios 7 - ios

I want to make app as my master thesis on ios 7 but I need to know if could run camera on background. I need to record video after user press home button (it should be traffic cam to car while user uses another app eg. navigation). I know it was not possilbe in ios 6 but I know that ios 7 has better support for background tasks... Is it please possible? I would be grateful for every answer. Thank you

There is a list of long-running tasks permitted in the background in Apple's documentation.
Camera access is not one of them. You will need to have your app in the foreground to use the camera.

Related

How can I use ARKit while using Slide Over/Split Screen on iPadOS?

I have an app that uses ARKit to detect faces and send over the network the coordinates of interest, which works well. I would like this app to run in background, still sending the data over the network, while I would be using another app (almost) fullscreen.
The option 'Enable multiple windows' is activated in info.plist, but as soon as I launch my other app, the ARKit app stops sending information (the app actually probably stops).
Is there a simple way to do this, and at least is this feasible? Thanks!
This is not possible at this point. Camera and AR stuff is disabled at a system level in apps when they are displayed in Slide Over or Split View.
I'd recommend displaying a warning message when Slide Over/Split Screen is being used saying that you should use the app in full screen mode. See this answer under a different question for details.

Is it possible to detect another application from the current app in iOS?

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.

How to programmatically control iPhone or device speaker in iOS

I am creating a conference app for iOS 9, which makes a call. Once call is made it takes user to native iPhone screen. Later user can come back to our app to do various tasks, when call is running in background. We need to give a user option to control that iPhone speakers On/Off from our app itself.
But unfortunately, we are not able to find any document or sample on ths.
Kindly advice us how to achieve ths functionality.

pick the sensors (accelerometer, gyroscope) data while the iPhone locked

the main idea of an app i'm working on it is: if the user picked up and put down his iPhone even if it's locked; or interact with it(i.e press the home button, volume button, power button), i should inform the app to do something.
the big problem that faced me is the sensors don't work in the background, and i saw a problem like mine here with no answer:
iOS 7.1: Get Core Motion data (accelerometer, gyroscope) while app is in background
so please anyone can help me with this mission? any example ?
I'd be thankful for any help.

Shake functionality in a music application

I have developed a small music app by using AVPlayer and MPMediaPickerControlLibrary with all the normal required functionalities for a music app. The app is also capable of running in the background when the screen is locked.
Now, what I want is to start the app when the screen is locked through a shake and soon as the app starts the current song should start playing.
I am not able to achieve this from a long time
Any suggestions on this will be highly appreciated or any other workaround apart from shake to turn on the music in the app when the screen is locked in iPhone.
Thanks in advance.
You need to implement the a CMMotionManager object, but keeping it running all the time in background will be a major power consumption issue.
Modifying the updateInterval property to reduce the number of updates will defeat the purpose, given that you may miss a shake in background.
Now, if the app was terminated by the user, then no motionManager object will be available until the user launches the app again.

Resources