onnela-lab / beiwe-android

Beiwe is a smartphone-based digital phenotyping research platform. This is the Beiwe Android app code. The Beiwe2 app is also available on the Google Play store to use with open source builds of the Beiwe backend.
https://www.beiwe.org/
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

Android 7 enables you to swipe away notifications #21

Closed zagorsky closed 6 years ago

zagorsky commented 6 years ago

Hi @mariasimoneau, as we discussed in our phone call this morning, you and I have both noticed the new feature that in Android 7, if you have more than one Beiwe notification at a time, the Android operating system groups them into a single bulk notification that you can swipe and make disappear (unlike an individual notification, which you can't make disappear).

As I said on the call this morning, I think I'll need about 3 hours to look into whether and how we can make multiple notifications undismissable in Android 7. I think you told me to go ahead with that- could you please confirm? Thanks, -Josh

mariasimoneau commented 6 years ago

Yes, this is fine, we can charge it to the support contract. Sorry for the delay, I though you were asking me about the deleting survey questions issue!

zagorsky commented 6 years ago

Hi @mariasimoneau, I fixed this issue in https://github.com/onnela-lab/beiwe-android/commit/2821d7299af995e9c45ca342a061864886921b46, and you can see it in action in version 2.2.3 of the Android app.

What happened is that Android 7 introduced a new feature that automatically grouped notifications together. When a user had only one notification from Beiwe, that notification wasn't possible to swipe away, but when Beiwe showed more then one notification, they got grouped, and the group notification was possible to swipe away. My fix is to return Beiwe to the way it was in Android 6: force each Beiwe notification to appear independently, and don't allow grouping.