I'm doing research for my company as we consider how to make our app work on iPhone. I'm looking for a list of iPhone sensors/measurement tools that can run in the background at the command of an app. Internet searches are not proving helpful, so I'm turning to the experts here.
I'd like to know if the following iPhone features in particular can be run in the background of the phone via an app:
Hall Sensor (used for electronic compass)
Proximity Sensor
Motion Sensor/Accelerometer
Gyroscope
Frequency Sensor
IR (infrared)
GPS
Camera
Microphone
Ambient Light Sensor
Again, I want to know if these features can be activated by an app to run in the background of the phone. Thank you.
There are 5 kinds of apps that are an exception to the rule:
Audio: Allowing users to use radio apps like Pandora, InstaCast in the background while they’re using iPhone’s Safari browser to surf the web etc.
VoIP: This will allow VoiP apps like Skype to run in the background so that it users can receive and make calls even when they’re running in the background.
Location: Apps that need to constantly track your GPS coordinates can now run in the background while you listen to music or surf the internet.
Newsstand apps that are downloading new content.
Apps that receive continuous updates from an external accessory in the Background.
Related
I would like to get notified when ios app is in range of other ios app even if they are both in the background mode. I know that I cannot advertise successully as a ibeacon after my ios app has gone to background because advertisement data is put in 'overflow' area. But the question is if we can extend the time that it is possible to advertise/simulate iBeacon? Are there any workarounds for this?
For example can I connect the devices in range by knowing their proximity UUID without user even knowing it? That would allow me exchange data between devices because my plan is that every user device will advertise with the same proximity UUID and the way I will identify users will be mix of major and minor ids.
Thanks in advance!
While iOS devices may not advertise iBeacon in the background, they can advertise what is known as the Overflow Area advertisement, which contains 128 bits of data. These Overflow Area advertisements are readable by backgrounded apps on other iPhones in the vicinity, provided those iPhones have their screen illuminated. (This happens even when phones are unused, as screens are typically illuminated briefly after a notification comes in.)
This makes it possible for one backgrounded iPhone app to read another backgrounded iPhone app's unique identifier passively in the background with no user interaction.
Advanced techniques are needed to configure Overflow Area advertisements, and to encode/decode unique identifiers inside them. Fortunately, I wrote up a detailed blog post of how this works, and created an open-source reference app you can use as a starting point to building your own app. This way, you don't need to master the complexities yourself to get this working.
If you build and run the reference app on two iPhones, it will assign a unique numeric identifier to each phone, and then you will see that Phone A detects the unique identifier of phone B and vice versa.
I am orientating on developing an app to synchronize all pictures taken by the iPhone camera.
I searched quite a lot and can't find much about the hardware event for the camera shutter on the iPhone.
Is it possible like the android CAMERA_BUTTON BroadcastReceiver in the manifest, to listen if the camera button is pressed in general, without the app being specifically launched?
Or an overlay on the existing iOS camera app?
Update 02-05-2018
I din't managed to get a direct detection of the camera button, also no ongoing detection from pictures take from the camera(PHPhotoLibraryChangeObserver). When the app is killed, all listeners are also killed. I am however using this when the app is booted up with the locationchange mechanism
In the end I used the Using the Significant-Change Location Service to get the detection of the changed pictures to synchronize, ongoing. I used the NextCloud and OwnCloud as examples, which were containing this part.
Using the Significant-Change Location Service
The capturing of images and videos is an entire software related process managed by classes in the AVFoundation framework. The entire hardware of the iPhone is not accessible for applications and you cannot monitor the use of hardware directly. There are some system frameworks, but these won't help you. The AVFoundation doesn't have any notifications that it will post to registered observers.
All captured images and videos are put in the Photos library and the Photos library has notifications when something changes in the library. You can register your application as an observer for changes in the Photos library and you can specify the changes you want to observer. You can also collect the specific changes that have happened and have your application handle the changes in the Photos Library.
What I don't know is whether you can use this as a remote change and have your app being launched by iOS when it registers for that change in the Photos library. I do know that you can program your app to launch on reception of notifications, but I don't know if this can be done with this change observer. I would suggest to give it a try.
Hope this helps.
I want to make an App for concert. Basically this will serve a lights sync on the music played in the concert. The flashing of lights should be in sync in the beat or music at the concert.
Something like this:
https://itunes.apple.com/us/app/dan-deacon/id536378735?mt=8
Question is
Is the app listening to the music thru the microphone?
If it is listening, how does it know when to flash the lights based on the beat of the music or the music itself?
In the example app I posted it's not using any wifi or mobile data so does it mean that it's standalone and does #1 and #2?
I have this question coz I'm new to app development. I want to do those feature but my idea is that there is a server which we control that will just send the lights flashing pattern on those apps, my concern is that if there's were 100,000 people in the event, provided the all have a wifi connection, will the sending of flashing lights pattern be a problem espcially you are sending hundred thousands of commands at the same time? I would prefer it to be in offline mode but how till it exactly work?
That is an amazing app. You need to synchronize your apps to the musik and maybe the apps among them selfs.
I picked some links for you:
http://content.iospress.com/articles/journal-of-embedded-computing/jec00021
http://www.cse.wustl.edu/~cdgill/PDF/RTSS08.pdf
http://blog.trifork.com/2013/02/18/build-build-massively-scalable-soft-real-time-systems-with-erlang/
In praxis i can imagine that the user starts playing the song and the app synchonize by the recorded sounds...
Like everyone else I'm venturing into mobile app-development and I'm looking at different frameworks / languages. The ones that look most appealing to me are Phonegap, Corona SDK and Monotouch. Objective C seems to be a little too low level. I haven't done memory management for a long time and I'm not yearning to relive that experience. But if that's where I need to go to meet the client's need, I'll go there.
The client in this case needs location aware notifications in an iOS app.
A user story goes like this: The user is out walking the town. She's got her iPhone in her pocket and is listening to music via iTunes. As she walks into her local mall my app (running in the background) detects that she is in the proximity of a branch of her bank. My app also knows that the user has some errand to do at the bank. So my app interrupts the currently playing iTunes track, plays a notification sound and puts a notification text on the screen, telling the user that there's a bank office nearby and that she might want to do that bank errand now.
Could this be done with either Phonegap, Corona SDK or Monotouch?
MonoTouch supports all types of iOS location services (standard, significant location change and region monitoring) so yes, you can do it with MonoTouch.
Whilst Apple has started bringing in geo-location notifications with the Reminders app I'm fairly certain that it won't be exposed in the higher level frameworks as of yet.
Some good info here in the Apple developer docs
There are several ways to track the user’s location in the background,
most of which do not actually require your app to run continuously in
the background:
The significant-change location service (Recommended)
Foreground-only location services
Background location services
...
All are possible with MonoTouch. Pretty sure they are with PhoneGap also. Don't know about Corona.
There are 2 iPhone applications. One application running in the foreground and the other running in the background. Is there any way to get the background application to send data over USB without coming into foreground? Ideally we want to keep the foreground app in the foreground, while the background app process some data. Once the data is processed it will inform the foreground app that the data has been processed.
No it cannot. It cannot even do this without the use of private frameworks, unless you're in the Made for iPhone program. If you are, then your organization will know, based on the documentation made available to you, what you can and cannot access, when and how.
Should you be in the Made for iPhone program, and are unclear as to what you have access to and when, contact the person in your organization who is the technical contact with Apple for this program, they will be able to give you the details.
If the task is started while the app is in the foreground and you call the appropriate beginBackgroundTask/endBackgroundTask methods, you should be able to have it continue running after the app is backgrounded.
Note that access to USB is restricted (see jer's answer) and that there's no officially sanctioned way to communicate between different apps on the same device. Also, you can only buy/download one app at a time in the App Store and I can't see Apple approving an app that required you to download a second app for it to work. So you may have bigger problems to solve first.
It would help significantly if you told us what you actually wanted to achieve. For example, "I want MyApp on the user's phone to communicate with MyApp on the user's computer".
The absolute easiest way is to send data between the phone and a computer is to require that they're both on the same Wi-Fi network. Several iPhone apps incorporate a web server (this was the easiest way of "file sharing" before OS 3.2), and many more iPhone apps connect to a computer running server software.
Your other options, more or less:
Reverse-engineer the Bluetooth side of GameKit and reimplement it on the computer-side. I'm not aware of anyone who's done this. Loosely, I think it's IP over Bluetooth PAN plus some sort of Bluetooth service discovery.
Audio input/output, e.g. the headphone jack or certain pins on the dock connector. I'm not entirely sure how the mic side works (the resistance was a bit high for a carbon mic when I checked), but you might get lucky and find a way to turn it into "line in" or find "line in" pins on the dock connector.
A webcam pointing at the iDevice screen (and the iDevice camera pointing at the computer screen). Ewwwww.
Join the MFi program.