How To: These Hacks Make Your iPhone Apps Play Different Background Sounds When You Open Them

These Hacks Make Your iPhone Apps Play Different Background Sounds When You Open Them

You can play background sounds in iOS 15 to help you focus, stay calm, or fall asleep, essentially turning your iPhone into a personal sound machine wherever you go. Even better, there's a way to set each of your apps to play one of Apple's six ambient soundscapes automatically. When you open the app, its assigned sound plays, then it stops when you exit or switch to another app.

While iOS 15 includes "Per-App Settings," you won't find any background sounds in there. Instead, you'll need to create an automation in Shortcuts. Because there is no "Detect Background Sounds" action in Shortcuts yet, we'll need to improvise. That means there are multiple ways you can go about it. None are perfect solutions, so they are more like "hacks" to use until something better comes along.

Step 1: Create a New Automation

First, open up Shortcuts, tap the "Automation" tab, and hit the blue "Create Personal Automation" button. If you already have one or more automations saved, tap the plus (+) icon in the top right to find the "Create Personal Automation" button.

Step 2: Choose the Apps for the Sound

Select "App" from the list, tap "Choose," and highlight the app or apps in question. There's no need to create an automation for each app itself. Instead, you're making one for each background sound and volume pairing, so select all the apps you want for the sound and volume level you'd like to set up first. You can edit these later to add more apps, subtract apps, or change volume levels.

Hit "Done" when finished checking your apps.

Step 3: Choose the Right Shortcut

Like I said before, there are multiple ways to build a shortcut that plays background sounds when you open an app and stops it when you exit. I'll give you two options using "Automations" below, as well as one using a regular shortcut, but if you know of a better way, let us know!

Note: when setting "Background Sound," you have six choices:

  • Balanced Noise
  • Bright Noise
  • Dark Noise
  • Ocean
  • Rain
  • Stream

Option 1: Toggle the Background Sound

The easiest way is to toggle "Background Sounds" on and off whenever the chosen app is opened and closed. It works like a charm, as long as you're not already playing any background sounds. If you are, when you open the app, it will toggle the sound off, and it will turn it on when you exit. To avoid that, try Option 2 below.

  1. Select both "Is Opened" and "Is Closed" on the New Animation window.
  2. Tap "Next."
  3. Add "Set Background Sounds" on the Actions window.
  4. Tap "Turn" in that action, and choose "Toggle" instead.
  5. Add another action for "Change Background Sound."
  6. Tap the current background sound in that action if it's not the one you want, and choose the one you do want.
  7. Add another action for "Set Background Sounds Volume." (This is optional.)
  8. Tap the current percentage for "Volume" in that action, and choose the volume level you want.
  9. Add another action for "Set Background Sounds Volume." (This is optional.)
  10. Tap "Volume" and change it to "Volume When Media Is Playing."
  11. Tap the current percentage for that, and choose the volume level you want.
  12. Hit "Next" in the top right.
  13. Toggle off "Ask Before Running."
  14. Hit "Done" to save.

Option 2: Turn the Background Sound On or Off

This way requires two separate automations — one to trigger your background sound when the app opens and another to turn off background sounds when the app closes. It's by far the best option on this list, only it takes more time to set up than Option 1.

To create the automation that will turn "Background Sounds" on:

  1. Select "Is Opened" on the New Animation window.
  2. Tap "Next."
  3. Add "Set Background Sounds" on the Actions window.
  4. Make sure the action says "Turn Background Sounds On," which is the default.
  5. Add another action for "Change Background Sound."
  6. Tap the current background sound in that action if it's not the one you want, and choose the one you do want.
  7. Add another action for "Set Background Sounds Volume." (This is optional.)
  8. Tap the current percentage for "Volume" in that action, and choose the volume level you want.
  9. Add another action for "Set Background Sounds Volume." (This is optional.)
  10. Tap "Volume" and change it to "Volume When Media Is Playing."
  11. Tap the current percentage for that, and choose the volume level you want.
  12. Hit "Next" in the top right.
  13. Toggle off "Ask Before Running."
  14. Hit "Done" to save.

The automation to turn "Background Sounds" off is easier. If you don't mind manually turning off "Background Sounds" all the time, you could omit these "Is Closed" instructions.

  1. Select "Is Closed" on the New Animation window.
  2. Tap "Next."
  3. Add "Set Background Sounds" on the Actions window.
  4. Tap "On" to switch it "Off" so it says "Turn Background Sounds Off."
  5. Hit "Next" in the top right.
  6. Toggle off "Ask Before Running."
  7. Hit "Done" to save.

Option 3: Create a Home Screen Shortcut

This option will only turn on "Background Sounds" to the sound and volume level you want whenever you open the shortcut from your Home Screen or via Siri.

There are multiple downsides. First, it will keep playing the sound when you exit the app. To fix that, you'd need to set up an "off" automation, as seen in Option 2 above. Second, you have to make a shortcut for every app you want to link to a background sound. And third, it will only work from the Home Screen or via Siri.

  1. Ignore Steps 1–3 above, and go to "My Shortcuts" in the Shortcuts app.
  2. Start a new shortcut.
  3. Give it the name of the app you're linking to.
  4. Add a custom app icon if you'd like. (This is optional.)
  5. Add the "Open App" action.
  6. Tap "App" on that action, and choose the app in question.
  7. Add "Set Background Sounds."
  8. Make sure the action says "Turn Background Sounds On," which is the default.
  9. Add another action for "Change Background Sound."
  10. Tap the current background sound in that action if it's not the one you want, and choose the one you do want.
  11. Add another action for "Set Background Sounds Volume." (This is optional.)
  12. Tap the current percentage for "Volume" in that action, and choose the volume level you want.
  13. Add another action for "Set Background Sounds Volume." (This is optional.)
  14. Tap "Volume" and change it to "Volume When Media Is Playing."
  15. Tap the current percentage for that, and choose the volume level you want.
  16. Hit the Settings button in the top right, then "Add to Home Screen," and "Add." (You can add a custom app icon now if you didn't before and do want one.)
  17. Hit "Done," then the X button in the top right.

You could use apps like ToolBox Pro to develop a more advanced automation, but ToolBox Pro's "Is audio playing?" action can't distinguish between media and background sounds.

In a perfect world, Apple or Toolbox Pro would have an action for "Is Background Sounds Playing" or "Detect Background Sounds." With that, you could add an "if" statement to the beginning of Option 1 above that changes the background sound when a background sound is already playing. That way, it wouldn't toggle off "Background Sounds" if it's already on. Maybe one day.

Keep Your Connection Secure Without a Monthly Bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix without regional restrictions, increase security when browsing on public networks, and more.

Buy Now (80% off) >

Other worthwhile deals to check out:

Cover photo and screenshots by Justin Meyers/Gadget Hacks

Join the Next Reality AR Community

Get the latest in AR — delivered straight to your inbox.

Be the First to Comment

Share Your Thoughts

  • Hot
  • Latest