Sleep

How to connect Sleep as Android

Take a breath, this is easier than it sounds. Sleep as Android is a popular sleep tracking app for Android phones. It is Android only, so if you have an iPhone, please see the AutoSleep, Sleep Cycle or Pillow guide instead.

MigraineMe does not talk to Sleep as Android directly. Sleep as Android writes your sleep to Health Connect, a small free app made by Google that holds health data on your phone. MigraineMe then reads from Health Connect. This is more private, because your sleep stays on your phone.

You only need to do this once.


On iPhone

Sleep as Android is not available on iPhone. If you have an iPhone, please see the separate guide How to connect AutoSleep, Sleep Cycle or Pillow.


On Android

Step 1: Make sure Health Connect is installed

On most newer Android phones, Health Connect is already there.

  1. Open the Play Store.
  2. Search for Health Connect.
  3. If you see Install, tap it.
  4. If you see Open, you already have it. You can close the Play Store.

Step 2: Tell Sleep as Android to send to Health Connect

  1. Open Sleep as Android.
  2. Tap the three lines in the top left corner (the menu).
  3. Tap the gear icon in the top-left of the screen.
  4. Scroll down and tap Services.
  5. Tap Health Connect.
  6. Turn the switch on.
  7. A permission screen will appear. Tap Allow all, then Allow.

If you do not see Health Connect in the Services list, update Sleep as Android in the Play Store and try again.

Step 3: Connect MigraineMe to Health Connect

  1. Open MigraineMe.
  2. Tap the gear icon in the top-left of the screen.
  3. Tap Connections.
  4. Find Health Connect and tap Connect.
  5. On the permission screen, tap Allow all, then Allow.

Step 4: Check that it is working

  1. Sleep tonight as you normally would, with the phone near the bed.
  2. In the morning, open Sleep as Android and check that last night was recorded.
  3. Open MigraineMe.
  4. Tap the Monitor tab.
  5. Scroll to the Sleep card. You should see your sleep within one or two hours of waking up.

What MigraineMe does with your sleep data

MigraineMe reads how long you slept and how restful that sleep was. It uses this to spot patterns. For example, a short or broken night often shows up the day before a migraine, and MigraineMe will start to flag this for you over time.

You will see your sleep in the Sleep card on the Monitor tab. After a few weeks, short or broken sleep may also show in the Top contributors card on Home on the days it counts toward your risk.

Troubleshooting

"Sleep as Android did not record last night"

This is a Sleep as Android problem, not a MigraineMe one. The most common reason is that the phone was not next to the bed, or the app was force-closed during the night.

  1. Open Sleep as Android.
  2. Tap the moon icon to start a new tracking session tonight.
  3. Try again tomorrow.

"Sleep as Android recorded, but Health Connect is empty"

  1. Open the Health Connect app.
  2. Tap App permissions.
  3. Find Sleep as Android in the list and tap it.
  4. Make sure Sleep is switched on under Allowed to write.

"Health Connect has it, but MigraineMe does not"

  1. Open Health Connect.
  2. Tap App permissions.
  3. Tap MigraineMe.
  4. Make sure Sleep is switched on under Allowed to read.
  5. Close MigraineMe and open it again. It checks Health Connect each time you open it.

Still stuck?

Write to us at help@migraineme.app and tell us:

We usually reply within a day.

More in this section

Still stuck? Write to us at help@migraineme.app

Download MigraineMe