-
Notifications
You must be signed in to change notification settings - Fork 505
Conversation
internal static void PlatformStart(SensorSpeed sensorSpeed, Action<CompassData> handler) | ||
static SensorListener listener; | ||
static Sensor magnetometer; | ||
static Sensor accelerometer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we dispose/null these out when they are no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so they are shared system wide and if you dispose them out then they will effect other listeners from my testing :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well actually.... maybe if we only allow one at a time.... let me see here. Will need to see if you can do both compass and others at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it could get ugly, but could we track/count the # of listeners we have and dispose if 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we use a weak reference? This way we leave it up the Androids?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#resolved
Description of Change
Makes API for compass event based.
Bugs Fixed
PR Checklist