Muse and iOS app background modes


#1

I have an app that uses Muse to visualize the data it gets from the headband in a stylized way. I’m curious if it is possible for Muse to collect data if my app goes into the background. There are a number of background modes available for iOS apps, such as for audio playback/recording, location tracking, etc., but it seems as though Muse disconnects as soon as the app goes into the background.

Furthermore, calling “beginBackgroundTask” on the application instance only gives you around 3 minutes of execution time in the background. I have my doubts, but does anyone know if it’s possible to keep an app running in the background with Muse connected gathering data? It would be useful for people wanting to record longer sessions.


#2

Muse Monitor will record in the background indefinitely… but, if the phone decides that it needs more resources for another app, then it will kill it off. This means you can background the app, but if you then start playing a game, it will likely get killed, even though it has all the correct background task permissions and an active bluetooth connection.

The only way I’ve read to work around this is to have your app pretend to be playing music by playing a silent audio track. If you do this, your app will still get killed off if resources are required, but any app playing music is put much higher on the priority list. You should note however that this practice of playing silent audio, while recommended by many people online, is frowned upon by Apple and may result in your app getting banned.