Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I prevent the notification center from opening on swipe down?

Hello!  I have an application that requires use of the entire screen for swipe gestures.  Is there any way that I can prevent a swipe down from opening the notification center?

 

I have already found how to prevent the swipe right to go back behavior by calling preventDefault() on the 'beforeunload'.  Is there something similar that can be done for the notification center?

Best Answer
5 REPLIES 5

For context, I am developing on a Fitbit Sense with the latest sdk

Best Answer
0 Votes

Probably not for a Clock on a Sense.

The system defaults take precedence which makes even scrolling an issue.

But if you make it an App that might work, though that has other implications which may possibly be overcome with preventDefault()

Author | ch, passion for improvement.

Best Answer

Thanks for the response!  I am building a sense App, so I was able to use the preventDefault trick to stop the app from unloading on a left swipe.  However, I can't seem to find an event that calling preventDefault on will will cause the notification center to not open.  I've tried it for every event I can find on the Document, Appbit, and the element I'm using as a detector

Best Answer
0 Votes

I don't think that gesture can be over-ridden.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

@isaacfehr  - the trick in an App is to not pull down from the top edge or left edge. As @Gondwana  says the system gestures take precedence.

 

See the SimpleCalendar app. It has 4 way scroll starting from the middle and doesn't even use preventDefault().

 

Whereas the SimpleTimer app uses preventDefault() so the back button can be used to start / pause the timer or stopwatch.

 

Not sure that preventDefault() will override a full swipe from the left edge, it depends a bit on the action.

 

Author | ch, passion for improvement.

Best Answer
0 Votes