EGHDK
EGHDK

Reputation: 18130

Android notification flags require pipe?

I'm trying to set an android notification flag like Notification.FLAG_NO_CLEAR. When searching online I see myNotification.flags |= Notification.FLAG_NO_CLEAR; I realize that it needs the |= or else it doesn't work... but my curiosity has gotten the best of me because I've never seen it before.

Upvotes: 0

Views: 157

Answers (1)

ataulm
ataulm

Reputation: 15334

It's not a pipe, it's a bitwise operator.

It's used instead of multiple flags for a single operation.

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/op3.html http://sys.cs.rice.edu/course/comp314/10/p2/javabits.html

Upvotes: 4

Related Questions