Basically I would like to turn on my app when in a certain environment(club scene), can an app be turned on in iOS using an algorithm?
Regards,
Feras A.
iOS is not in favor of keeping the mic open all the time to record everything. So I dont see this is possible anytime soon.
You have to have an app that records the voice all the time and does a lot of FFT in order to determine what kind of scene you are in.
Unless your app is a music streaming app unfortunately app will be suspended by OS sooner or later so you cannot listen all the time.
Related
I want to create an Expo app for ios that will say something, and wait for my reply, via headphones. The headphones part is immaterial but it indicates what I want... which is for this to run while my phone is locked and in my pocket. Once I have replied, the app would proceed. I have built Expo apps but I am unsure of whether an app can still interact with me via audio and the microphone in this way while the phone is locked. Also, I don't know if Expo has introduced this sort of capability. I also don't know if React Native (i.e. ejected Expo apps) can do this sort of thing. The lack of apps that truly interact in this way (not via Siri etc) are far and few between so I'm assuming it's a hard problem to solve. I would be just as happy if I could have a browser page running on the device do the same thing, but I'm pretty sure webpages can't play audio and wait for replies when a phone is locked. Is any of this possible at this point?
I did research this online, just to be clear. I wasn't able to find an answer so I came here. I mention this because this whole post does have that 'can you research this for me' vibe. I'm just hoping someone has knowledge of what is possible.
There is a page in the expo documentation that says when not to use expo, and the following is in there:
The SDK doesn't support all types of background code execution
Background execution is the ability to run code when the app is not foregrounded or the device is sleeping. We support background geolocation (including geofencing) and background fetch, but we do not yet support background audio with the operating-system playback controls and you cannot handle push notifications in the background. This is a work in progress.
You can take a look at it here.
I think you can do it in React Native though, however I can't say if there is a library to do it, so you can try creating your own with native code. You can see how here for android and here for ios.
After Googleing and looking through StackOverflow, I haven't found a suitable solution to "inject audio from an iPhone app into an ongoing phone conversation."
As an iPhone app dev newbie, I found Intercepting phone call - iPhone (correct method to hook in CoreTelephony), but I don't want to do ant jailbreaking. I want my iPhone app to insert pre-recorded phrases and noise effects into an ongoing phone conversation.
Can anyone tell me where I would start with that? Any hints, links or just some "general direction" advice would be much appreciated.
The iOS security sandbox actively prevents any (non-Apple) app from injecting audio into another app, such as the Phone app, where inter-app audio is not explicitly supported.
I need to set a timer to lock an iPhone from my app. While using the application, after 3 to 5 minutes the phone should become locked.
Short answer: You can't.
Long Answer: For the security of iOS users, Apple does not allow any application to work with important hardware matters, such as locking the iPhone or controlling the usage of other apps. If your app even attempts to do such a thing (using any method, like external APIs), your app will immediately be rejected by Apple. It is not even worth trying.
You cannot lock the screen programmatically without any private API. Even if you use a private API, your app may probably be rejected by App Store.
However you can indeed achieve by sending keyboard events from paired bluetooth hardware devices. But that means your code depends on a Bluetooth connection and I cannot think of any practice use of that. To do this with Bluetooth, click here.
I have experience programming in OS X but have never programmed in iOS. I want to create a special iOS apps for my special needs to prevent my kid from spending too much times in my IPhone/IPad. It's a simple app which allows the user to set the time and once the time elapses, the device can be either turned off or its screen will be locked.
May I know whether this is possible and what are the APIs involved? I just need a very brief idea for me to kick start.
Thanks in advance.
Your requirement is really special.
Unfortunately there is no way to lock your iOS device or automatically shut down it, unless you jailbreak the phone.
I would set the device to Kiosk Mode (Guided Access) or Single App Mode (Using Mobile Device Management). This will prevent your kid from exiting the app.
You could then program your app to stop responding after the elapsed time. It can't shut down the device, but should lock the screen after x minutes of inactivity (configured in the settings).
I noticed it is possible for an iOS app to continue recording audio in the background while another app is in the foreground recording audio (note that this isn't strait forward on the iOS simulator, but a hack involving a background process makes it possible).
Is there any way to ensure that no other apps are recording audio before you start to record? If so, is there any way to stop other recording apps so that an app can record?
No, you cannot hinder another applications functions (well not using the iOS SDK) the only way this would be possible is on a jailbroken iPhone. But with an application built for the App Store this is not possible.
I think you may just tell user you can not get access, let them to turn off other background app.